Public Types | |
typedef read | opCall |
typedef bool(* | Filter )(FilePath) |
Public Member Functions | |
FileScan | read (char[] path, char[] ext) |
FileScan | read (FilePath path, char[] ext) |
FileScan | read (FilePath path, Filter filter) |
FileScan | files (void(*visit)(File)) |
FileScan | directories (void(*visit)(FilePath)) |
Private Member Functions | |
bool | simpleFilter (FilePath fp) |
void | scanFiles (inout Dependencies deps, FilePath base) |
Private Attributes | |
char[] | ext |
Dependencies | deps |
Filter | filter |
void files (File file) { Stdout (file.getPath) (CR); } void dirs (FilePath path) { Stdout (path) (CR); } FileScan scan = new FileScan; // find all files with a 'd' extension scan ((args.length == 2) ? args[1] : ".", "d"); Stdout ("directories:") (CR); scan.directories (&dirs); Stdout (CR) ("files:") (CR); scan.files (&files);
Definition at line 77 of file FileScan.d.
|
Definition at line 79 of file FileScan.d. |
|
Definition at line 85 of file FileScan.d. Referenced by read(). |
|
Read a set of files and directories from the given parent path, where the files are filtered by the given extension. Definition at line 106 of file FileScan.d. References FilePath. Referenced by read(). |
|
Read a set of files and directories from the given parent path, where the files are filtered by the given extension. Definition at line 118 of file FileScan.d. References ext, read(), and simpleFilter(). |
|
Read a set of files and directories from the given parent path, where the files are filtered by the provided delegate. Definition at line 131 of file FileScan.d. References deps, Filter, FileScan::Dependencies::mods, FileScan::Dependencies::pkgs, and scanFiles(). |
|
Visit all the files found in the last scan. The delegate should return false to terminate early. Definition at line 147 of file FileScan.d. References deps, File, and FileScan::Dependencies::mods. |
|
Visit all directories found in the last scan. The delegate should return false to terminate early. Definition at line 161 of file FileScan.d. References deps, FilePath, and FileScan::Dependencies::pkgs. |
|
Local delegate for filtering files based upon a provided extension Definition at line 175 of file FileScan.d. References FilePath::getExtension(), and FilePath::getName(). Referenced by read(). |
|
Recursive routine to locate files and sub-directories. Definition at line 192 of file FileScan.d. References File, FilePath, and FileProxy::toList(). Referenced by read(). |
|
Definition at line 81 of file FileScan.d. Referenced by read(). |
|
Definition at line 82 of file FileScan.d. Referenced by directories(), files(), and read(). |
|
Definition at line 83 of file FileScan.d. |