|
Drag[en]gine Script Module DragonScript 1.32.1
|
File path. More...
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.
| bool Dragengine.File.equals | ( | Object | object | ) |
Files are equal.
| object | Object to check. |
| String Dragengine.File.getComponentAt | ( | int | index | ) |
Component at index.
| int Dragengine.File.getComponentCount | ( | ) |
Count of components.
| String Dragengine.File.getName | ( | ) |
Name of path which is the last path component or the prefix if empty.
| String Dragengine.File.getPath | ( | ) |
String representation of path.
| int Dragengine.File.hashCode | ( | ) |
Hash code of File.
| bool Dragengine.File.isAbsolute | ( | ) |
Path is absolute.
Path is absolute if prefix is '/'.
|
static |
Path is absolute.
| bool Dragengine.File.isEmpty | ( | ) |
Path is empty.
| 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.
| 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.
| bool Dragengine.File.isRelative | ( | ) |
Path is relative.
Path is relative if prefix is empty.
| File Dragengine.File.new | ( | ) |
Create File with root path.
Create File from filename appended to parent File.
| parent | Path to parse filename relative to. |
| filename | Filename to parse. |
| EInvalidParam | filename is absolute. |
Create File from filename appended to parent File.
| parent | Path to parse filename relative to. |
| filename | Filename to parse. |
| 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. |
Create File from filename appended to parent File.
| parent | Path to parse filename relative to. |
| filename | Filename to parse. |
| File Dragengine.File.operator+ | ( | String | file | ) |
Create File from filename appended to parent File.
| parent | Path to parse filename relative to. |
| filename | Filename to parse. |
Relative path or null.
If file.isParentOf(this) is true returns relative path to file.
| File Dragengine.File.operator- | ( | String | directory | ) |
Relative path or null.
If file.isParentOf(this) is true returns relative path to file.
Relative path or null.
If isParentOf(file) is true returns relative path to this path.
| File Dragengine.File.relativePath | ( | String | path | ) |
Relative path or null.
If isParentOf(file) is true returns relative path to this path.
| String Dragengine.File.toString | ( | ) |
String representation of this filename.
Same as getPath().
| Array Dragengine.File.pComponents |
| String Dragengine.File.pPrefix |