Filesystem convenience functions.

  1. 6.x drush/includes/filesystem.inc filesystemfunctions
  2. 4.x drush/includes/drush.inc filesystemfunctions
  3. 5.x drush/includes/filesystem.inc filesystemfunctions
  4. 7.x drush/includes/filesystem.inc filesystemfunctions

Functions

Namesort descending Location Description
drush_copy_dir drush/includes/filesystem.inc Copy $src to $dest.
drush_correct_absolute_path_for_exec drush/includes/filesystem.inc If we are going to pass a path to exec or proc_open, then we need to fix it up under CYGWIN or MINGW. In both of these environments, PHP works with absolute paths such as "C:\path". CYGWIN expects these to be converted to…
drush_delete_dir drush/includes/filesystem.inc Deletes the specified file or directory and everything inside it.
drush_delete_dir_contents drush/includes/filesystem.inc Deletes the contents of a directory.
drush_delete_tmp_dir drush/includes/filesystem.inc Deletes the provided file or folder and everything inside it. This function explicitely tries to delete read-only files / folders.
drush_dir_md5 drush/includes/filesystem.inc Calculates a single md5 hash for all files a directory (incuding subdirectories)
drush_file_append_data drush/includes/filesystem.inc Simple helper function to append data to a given file.
drush_file_not_empty drush/includes/filesystem.inc Test to see if a file exists and is not empty
drush_find_tmp drush/includes/filesystem.inc Returns the path to a temporary directory.
drush_is_absolute_path drush/includes/filesystem.inc Determines whether the provided path is absolute or not on the specified O.S. -- starts with "/" on *nix, or starts with "[A-Z]:\" or "[A-Z]:/" on Windows.
drush_mkdir drush/includes/filesystem.inc Cross-platform compatible helper function to recursively create a directory tree.
drush_move_dir drush/includes/filesystem.inc Move $src to $dest.
drush_normalize_path drush/includes/filesystem.inc Makes sure the path has only path separators native for the current operating system
drush_preflight_backup_dir drush/includes/filesystem.inc Decide where our backup directory should go
drush_prepare_backup_dir drush/includes/filesystem.inc Prepare a backup directory
drush_register_file_for_deletion drush/includes/filesystem.inc Any file passed in to this function will be deleted when drush exits.
drush_save_data_to_temp_file drush/includes/filesystem.inc Save a string to a temporary file. Does not depend on Drupal's API. The temporary file will be automatically deleted when drush exits.
drush_scan_directory drush/includes/filesystem.inc Finds all files that match a given mask in a given directory. Directories and files beginning with a period are excluded; this prevents hidden files and directories (such as SVN working directories and GIT repositories) from being scanned.
drush_tempdir drush/includes/filesystem.inc Creates a temporary directory and return its path.
drush_tempnam drush/includes/filesystem.inc Creates a temporary file, and registers it so that it will be deleted when drush exits. Whenever possible, drush_save_data_to_temp_file() should be used instead of this function.
drush_trim_path drush/includes/filesystem.inc Remove the trailing DIRECTORY_SEPARATOR from a path. Will actually remove either / or \ on Windows.
_drush_delete_registered_files drush/includes/filesystem.inc Delete all of the registered temporary files.
_drush_recursive_copy drush/includes/filesystem.inc Internal function called by drush_copy_dir; do not use directly.

Constants

Namesort descending Location Description
FILE_EXISTS_ABORT drush/includes/filesystem.inc Behavior for drush_copy_dir() and drush_move_dir() when destinations exist.
FILE_EXISTS_MERGE drush/includes/filesystem.inc
FILE_EXISTS_OVERWRITE drush/includes/filesystem.inc

File

drush/includes/filesystem.inc, line 8
Filesystem utilities.