Forked from driesvints/laravel-weekly-25-quick-tip.php
Created
November 15, 2013 06:09
-
-
Save WordpressDev/7479877 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Get an array of all files in a directory. | |
| $files = File::files('path_to_dir'); | |
| // Get all of the files from the given directory (recursive). | |
| $files = File::allFiles('path_to_dir'); | |
| // Get all of the directories within a given directory. | |
| $files = File::directory('path_to_dir'); | |
| // Copy a directory from one location to another. | |
| File::copyDirectory('path_to_dir', 'destination'); | |
| // Recursively delete a directory. | |
| File::deleteDirectory('path_to_dir'); | |
| // Empty a directory of all contents while preserving the directory itself. | |
| File::cleanDirectory('path_to_dir'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment