Filesystem directory manipulation.
More...
|
| boolean | Create (string path) |
| | Creates a folder at the path.
|
| boolean | Exists (string path) |
| | Determines if the folder at the path exists.
|
| array | GetFiles (string directory, string pattern, boolean allDirs) |
| | Gets the paths of all the files in the directory.
|
| array | GetDirectories (string directory, string pattern, boolean allDirs) |
| | Gets the paths of all the folders in the directory.
|
Filesystem directory manipulation.
◆ Create()
| boolean Directory.Create |
( |
string | path | ) |
|
Creates a folder at the path.
- Parameters
-
| path | The path of the folder to create. |
- Returns
- Returns whether folder creation was successful.
◆ Exists()
| boolean Directory.Exists |
( |
string | path | ) |
|
Determines if the folder at the path exists.
- Parameters
-
| path | The path of the folder to check for existence. |
- Returns
- Returns whether the folder exists.
◆ GetDirectories()
| array Directory.GetDirectories |
( |
string | directory, |
|
|
string | pattern, |
|
|
boolean | allDirs ) |
Gets the paths of all the folders in the directory.
- Parameters
-
| directory | The path of the folder to find folders in. |
| pattern | The search pattern for the folders. (ex: "*" for any folder, "image*" any folder that starts with "image") |
| allDirs | Whether to search into all folders in the directory. |
- Returns
- Returns an array containing the filepaths as strings.
◆ GetFiles()
| array Directory.GetFiles |
( |
string | directory, |
|
|
string | pattern, |
|
|
boolean | allDirs ) |
Gets the paths of all the files in the directory.
- Parameters
-
| directory | The path of the folder to find files in. |
| pattern | The search pattern for the files. (ex: "*" for any file, "*.*" any file name with any file type, "*.png" any PNG file) |
| allDirs | Whether to search into all folders in the directory. |
- Returns
- Returns an array containing the filepaths as strings.