10
edits
(Finished the structure of draft 5.) |
|||
Line 43: | Line 43: | ||
==== Directories ==== | ==== Directories ==== | ||
'''TODO''' Should the methods in this section use "mkdir" or "makeDir" style names? | |||
; list(path String) Iterator | ; list(path String) Iterator | ||
: returns an iterator that yields the names of the entries in a directory. Throws an error if the directory is inaccessible or does not exist. | : returns an iterator that yields the names of the entries in a directory. Throws an error if the directory is inaccessible or does not exist. | ||
; mkdir(path String) | ; mkdir(path String) | ||
: Create a single directory specified by ''path''. If the directory cannot be created for any reason an exception will be thrown. This includes if the parent directories of "path" are not present. | |||
: | : | ||
; | ; mktree(path String) | ||
: '''TODO''' Decide upon the name of this function. "mkdirs" or "mktree" or "makeTree" | |||
: Will create the directory specified by "path" including any missing parent directories. | |||
: | : | ||
; rmdir(path String) | ; rmdir(path String) | ||
: Removes a directory if it is empty. If it is not, or cannot be removed for another reason an exception will be thrown. | |||
: | : | ||
; rmtree(path String) | ; rmtree(path String) | ||
: | : | ||
: This does its best to remove the directory "path", akin to "rm -r" on Unix or "del /s" on Windows. That is it will recursively delete all directories and files under "path". | |||
==== Links ==== | ==== Links ==== |
edits