Virtual filesystems.
package | commandr |
---|
_is_dir(\?array $dir = null
) : boolean
\?array
Path to check (null: current dir is used)
boolean
Directory?_is_file(array $dir) : boolean
array
Path (with filename) to use
boolean
Directory?_pwd_to_array(string $pwd) : array
string
Path
array
Array-form pathappend_file(array $to_append, string $contents) : boolean
array
The file to which to append
string
The contents to append
boolean
Success?change_directory(array $target_directory) : boolean
array
The target directory path
boolean
Success?commandr_fs()
copy_directory(array $to_copy, array $destination) : boolean
array
The directory to copy
array
The destination path
boolean
Success?copy_file(array $to_copy, array $destination) : boolean
array
The file to copy
array
The destination path
boolean
Success?listing(\?array $dir = null
) : array
\?array
An alternate directory in which to perform the action (null: current directory is used)
array
Directories and files in the current working directorymake_directory(array $directory) : boolean
array
The new directory's path and name
boolean
Success?move_directory(array $to_move, array $destination) : boolean
array
The directory to move
array
The destination path
boolean
Success?move_file(array $to_move, array $destination) : boolean
array
The file to move
array
The destination path
boolean
Success?prepare_dir_contents_for_listing(array $entries) : array
array
Structure
array
Template parameter structureprint_working_directory(boolean $array_form = false
) : mixed
boolean
Return the pwd in array form?
mixed
The current working directory (array or string)pwd_to_string(\?array $pwd = null
) : string
\?array
Path (null: use $this->pwd)
string
String-form pathread_file(array $to_read) : \~string
array
The file to read
\~string
The file contents (false: failure)remove_directory(array $directory) : boolean
array
The directory-to-remove's path and name
boolean
Success?remove_file(array $to_remove) : boolean
array
The file to remove
boolean
Success?search(string $pattern, boolean $regexp= false
, boolean $recursive= false
, boolean $files= true
, boolean $directories= false
, \?array $dir= null
) : array
string
The search pattern (PRCE regexp or plain)
boolean
Is the search pattern a regexp?
boolean
Should the search be recursive?
boolean
Should files be included in the results?
boolean
Should directories be included in the results?
\?array
Directory (null: current directory is used)
array
The search resultswrite_file(array $to_write, string $contents) : boolean
array
The file to write
string
The contents to write
boolean
Success?_get_current_dir_contents(\?array $dir= null
, boolean $full_paths= false
) : \~array
\?array
Directory (null: current directory is used)
boolean
Whether to use full paths
\~array
Directory contents (false: failure)_get_filename(string $filename) : string
string
Path
string
Filename_merge_pwds(array $pwd1, array $pwd2) : array
." resolution.
array
Absolute path
array
Non-absolute path
array
Merged path_start_pwd() : array
array
Current directory$commandr_fs
$pwd