Method | Description | |
---|---|---|
copy ( string $origin, string $target, boolean $override = false ) | Copies a file. Uses Symfony's copy but actually honors the third parameter. | |
copyDir ( string $origin, string $target ) | Copies a directory. Uses Symfony's mirror() under the cover. | |
filesHaveSameContents ( $file1, $file2 ) : boolean | Compares two files and returns true if their contents is equal | |
mkdir ( string $dir, integer $mode = 488 ) | Creates a directory | |
remove ( string | Traversabl\Traversable $path ) | Removes a file / directory. Works recursively. | |
removeContent ( string $path ) | Removes the content of a directory (not the directory itself). Works recursively. | |
rename ( string $origin, string $target, boolean $overwrite = false ) | Renames (moves) origin to target. |
Method | Description | |
---|---|---|
possiblyFixGitPermissions ( string $path ) | Git for Windows makes files in .git/objects read-only. This method removes the flag so that operations like removing the folder work. |
public static filesHaveSameContents ( $file1, $file2 ) : boolean | ||
$file1 | ||
$file2 | ||
return | boolean |
public static removeContent ( string $path ) | ||
$path | string | Path to a directory. |