|
Drag[en]gine Script Module DragonScript 1.35
|
Public Member Functions | |
| bool | equals (Object object) |
| Files are equal. | |
| String | getComponentAt (int index) |
| Component at index. | |
| int | getComponentCount () |
| Count of components. | |
| String | getName () |
| Name of path which is the last path component or the prefix if empty. | |
| String | getPath () |
| String representation of path. | |
| int | hashCode () |
| Hash code of File. | |
| bool | isAbsolute () |
| Path is absolute. | |
| bool | isEmpty () |
| Path is empty. | |
| bool | isParentOf (File file) |
| File is a direct or indirect parent of another file. | |
| bool | isParentOf (String path) |
| File is a direct or indirect parent of another file. | |
| bool | isRelative () |
| Path is relative. | |
| File | new () |
| Create File with root path. | |
| File | new (File file) |
| Create copy of file. | |
| File | new (File parent, File filename) |
| Create File from filename appended to parent File. | |
| File | new (File parent, String filename) |
| Create File from filename appended to parent File. | |
| File | new (String filename) |
| Create File from filename. | |
| File | new (String parent, String filename) |
| Create File from filename appended to parent File. | |
| File | operator+ (File file) |
| Create File from filename appended to parent File. | |
| File | operator+ (String file) |
| Create File from filename appended to parent File. | |
| File | operator- (File directory) |
| Relative path or null. | |
| File | operator- (String directory) |
| Relative path or null. | |
| File | relativePath (File file) |
| Relative path or null. | |
| File | relativePath (String path) |
| Relative path or null. | |
| String | toString () |
| String representation of this filename. | |
Static Public Member Functions | |
| static File | absolutePath (String path, String baseDirectory) |
| Create absolute path of base directory and a potential relative path. | |
| static bool | isAbsolute (String path) |
| Path is absolute. | |
Public Attributes | |
| Array | pComponents |
| String | pPrefix |
File path.
This is not an open file but only an object for working with filenames. This object though can then be used with appropriate other objects to load files.
|
static |
Create absolute path of base directory and a potential relative path.
Used for loading files relative to a base path where the file path can be absolute or relative. If path is absolute a File instance of path is returned. If path is relative a File instance of baseDirectory with path appended is returned.
This method is safe to be used with path containing '..' at the beginning.
References getComponentAt(), getComponentCount(), and pComponents.
Referenced by operator-().
| bool Dragengine.File.equals | ( | Object | object | ) |
Files are equal.
| object | Object to check. |
Referenced by operator-().
| String Dragengine.File.getComponentAt | ( | int | index | ) |
| int Dragengine.File.getComponentCount | ( | ) |
Count of components.
Referenced by absolutePath().
| String Dragengine.File.getName | ( | ) |
Name of path which is the last path component or the prefix if empty.
Referenced by hashCode().
| String Dragengine.File.getPath | ( | ) |
String representation of path.
Referenced by isParentOf(), and operator-().
| int Dragengine.File.hashCode | ( | ) |
| bool Dragengine.File.isAbsolute | ( | ) |
Path is absolute.
Path is absolute if prefix is '/'.
References pComponents, and pPrefix.
Referenced by operator-(), operator-(), and toString().
|
static |
| bool Dragengine.File.isEmpty | ( | ) |
| bool Dragengine.File.isParentOf | ( | File | file | ) |
File is a direct or indirect parent of another file.
Typically used to check if a file is inside a directory.
References getPath(), and pComponents.
Referenced by operator-().
| bool Dragengine.File.isParentOf | ( | String | path | ) |
File is a direct or indirect parent of another file.
Typically used to check if a file is inside a directory.
References pComponents, and pPrefix.
| bool Dragengine.File.isRelative | ( | ) |
Path is relative.
Path is relative if prefix is empty.
References pComponents.
Referenced by operator+().
| File Dragengine.File.new | ( | ) |
Create copy of file.
References pComponents, and pPrefix.
Create File from filename appended to parent File.
| parent | Path to parse filename relative to. |
| filename | Filename to parse. |
References pComponents, and pPrefix.
| File Dragengine.File.new | ( | String | filename | ) |
Create File from filename.
| filename | Filename to parse. |
| File Dragengine.File.new | ( | String | parent, |
| String | filename ) |
Create File from filename appended to parent File.
| parent | Path to parse filename relative to. |
| filename | Filename to parse. |
References pComponents, and pPrefix.
Create File from filename appended to parent File.
| parent | Path to parse filename relative to. |
| filename | Filename to parse. |
References isEmpty(), isRelative(), pComponents, and pPrefix.
| File Dragengine.File.operator+ | ( | String | file | ) |
Relative path or null.
If file.isParentOf(this) is true returns relative path to file.
References isAbsolute().
| File Dragengine.File.operator- | ( | String | directory | ) |
Relative path or null.
If file.isParentOf(this) is true returns relative path to file.
References absolutePath(), equals(), getPath(), hashCode(), isAbsolute(), isParentOf(), pComponents, pPrefix, relativePath(), and toString().
Relative path or null.
If isParentOf(file) is true returns relative path to this path.
References pComponents, and pPrefix.
Referenced by operator-().
| File Dragengine.File.relativePath | ( | String | path | ) |
Relative path or null.
If isParentOf(file) is true returns relative path to this path.
References pComponents.
| String Dragengine.File.toString | ( | ) |
String representation of this filename.
Same as getPath().
References isAbsolute(), and pPrefix.
Referenced by operator-().
| Array Dragengine.File.pComponents |
Referenced by absolutePath(), getComponentAt(), hashCode(), isAbsolute(), isAbsolute(), isEmpty(), isParentOf(), isParentOf(), isRelative(), new(), new(), new(), new(), operator+(), operator-(), relativePath(), and relativePath().
| String Dragengine.File.pPrefix |
Referenced by getComponentAt(), hashCode(), isAbsolute(), isAbsolute(), isEmpty(), isParentOf(), new(), new(), new(), new(), operator+(), operator-(), relativePath(), and toString().