Drag[en]gine Script Module DragonScript
1.23
|
Public Member Functions | |
bool | equals (Object object) |
Files are equal. More... | |
String | getComponentAt (int index) |
Component at index. More... | |
int | getComponentCount () |
Count of components. More... | |
String | getName () |
Name of path which is the last path component or the prefix if empty. More... | |
String | getPath () |
String representation of path. More... | |
int | hashCode () |
Hash code of File. More... | |
bool | isAbsolute () |
Path is absolute. More... | |
bool | isEmpty () |
Path is empty. More... | |
bool | isParentOf (File file) |
File is a direct or indirect parent of another file. More... | |
bool | isParentOf (String path) |
File is a direct or indirect parent of another file. More... | |
bool | isRelative () |
Path is relative. More... | |
File | new () |
Create File with root path. More... | |
File | new (File file) |
Create copy of file. More... | |
File | new (File parent, File filename) |
Create File from filename appended to parent File. More... | |
File | new (File parent, String filename) |
Create File from filename appended to parent File. More... | |
File | new (String filename) |
Create File from filename. More... | |
File | new (String parent, String filename) |
Create File from filename appended to parent File. More... | |
File | operator+ (File file) |
Create File from filename appended to parent File. More... | |
File | operator+ (String file) |
Create File from filename appended to parent File. More... | |
File | operator- (File directory) |
Relative path or null. More... | |
File | operator- (String directory) |
Relative path or null. More... | |
File | relativePath (File file) |
Relative path or null. More... | |
File | relativePath (String path) |
Relative path or null. More... | |
String | toString () |
String representation of this filename. More... | |
Static Public Member Functions | |
static File | absolutePath (String path, String baseDirectory) |
Create absolute path of base directory and a potential relative path. More... | |
static bool | isAbsolute (String path) |
Path is absolute. More... | |
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 | ( | String | filename | ) |
Create File from filename.
filename | Filename to parse. |
File Dragengine.File.new | ( | String | parent, |
String | filename | ||
) |
File Dragengine.File.operator+ | ( | String | file | ) |
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 |