Virtual filesystems.
| package | commandr |
|---|
_is_dir(\?array $dir = null) : boolean
\?arrayPath to check (null: current dir is used)
booleanDirectory?_is_file(array $dir) : boolean
arrayPath (with filename) to use
booleanDirectory?_pwd_to_array(string $pwd) : array
stringPath
arrayArray-form pathappend_file(array $to_append, string $contents) : boolean
arrayThe file to which to append
stringThe contents to append
booleanSuccess?change_directory(array $target_directory) : boolean
arrayThe target directory path
booleanSuccess?commandr_fs()
copy_directory(array $to_copy, array $destination) : boolean
arrayThe directory to copy
arrayThe destination path
booleanSuccess?copy_file(array $to_copy, array $destination) : boolean
arrayThe file to copy
arrayThe destination path
booleanSuccess?listing(\?array $dir = null) : array
\?arrayAn alternate directory in which to perform the action (null: current directory is used)
arrayDirectories and files in the current working directorymake_directory(array $directory) : boolean
arrayThe new directory's path and name
booleanSuccess?move_directory(array $to_move, array $destination) : boolean
arrayThe directory to move
arrayThe destination path
booleanSuccess?move_file(array $to_move, array $destination) : boolean
arrayThe file to move
arrayThe destination path
booleanSuccess?prepare_dir_contents_for_listing(array $entries) : array
arrayStructure
arrayTemplate parameter structureprint_working_directory(boolean $array_form = false) : mixed
booleanReturn the pwd in array form?
mixedThe current working directory (array or string)pwd_to_string(\?array $pwd = null) : string
\?arrayPath (null: use $this->pwd)
stringString-form pathread_file(array $to_read) : \~string
arrayThe file to read
\~stringThe file contents (false: failure)remove_directory(array $directory) : boolean
arrayThe directory-to-remove's path and name
booleanSuccess?remove_file(array $to_remove) : boolean
arrayThe file to remove
booleanSuccess?search(string $pattern, boolean $regexp= false, boolean $recursive= false, boolean $files= true, boolean $directories= false, \?array $dir= null) : array
stringThe search pattern (PRCE regexp or plain)
booleanIs the search pattern a regexp?
booleanShould the search be recursive?
booleanShould files be included in the results?
booleanShould directories be included in the results?
\?arrayDirectory (null: current directory is used)
arrayThe search resultswrite_file(array $to_write, string $contents) : boolean
arrayThe file to write
stringThe contents to write
booleanSuccess?_get_current_dir_contents(\?array $dir= null, boolean $full_paths= false) : \~array
\?arrayDirectory (null: current directory is used)
booleanWhether to use full paths
\~arrayDirectory contents (false: failure)_get_filename(string $filename) : string
stringPath
stringFilename_merge_pwds(array $pwd1, array $pwd2) : array
." resolution.
arrayAbsolute path
arrayNon-absolute path
arrayMerged path_start_pwd() : array
arrayCurrent directory$commandr_fs
$pwd