Drag[en]gine Script Module DragonScript Script API  1.0
FileSystem Class Reference

File system. More...

Inheritance diagram for FileSystem:

Static Public Member Functions

Management
static byte getSeparator ()
 Filepath separator character for this operating system. More...
 
static byte getPathSeparator ()
 Path list separator character for this operating system. More...
 
static String getCurrentPrefix ()
 Current path prefix for this operating system. More...
 
static String getGamePath ()
 Path string set by the game. More...
 
Virtual file system access
static bool existsFile (String path)
 File exist. More...
 
static bool canReadFile (String path)
 File can be read. More...
 
static bool canWriteFile (String path)
 File can be written. More...
 
static bool canDeleteFile (String path)
 File can be deleted. More...
 
static void deleteFile (String path)
 Delete file. More...
 
static int getTypeOfFile (String path)
 Type of file. More...
 
static void scanDirectory (String path, Block ablock)
 Scan directory for files. More...
 
static bool pathMatchesPattern (String string, String pattern)
 Path matches a file pattern. More...
 

Static Public Attributes

File type constants
static final int REGULAR_FILE = 0
 Regular file. More...
 
static final int DIRECTORY = 1
 Directory. More...
 
static final int SPECIAL = 2
 Special file which is neither a regular file nor a directory. More...
 

Detailed Description

File system.

This is a native class. This is a pure static class. The class can not be instantiated

Author
Roland Pl├╝ss
Version
1.0
Date
2015

Member Function Documentation

§ canDeleteFile()

static bool canDeleteFile ( String  path)
static

File can be deleted.

§ canReadFile()

static bool canReadFile ( String  path)
static

File can be read.

§ canWriteFile()

static bool canWriteFile ( String  path)
static

File can be written.

§ deleteFile()

static void deleteFile ( String  path)
static

Delete file.

§ existsFile()

static bool existsFile ( String  path)
static

File exist.

If the filename is relative it is checked against the game path.

§ getCurrentPrefix()

static String getCurrentPrefix ( )
static

Current path prefix for this operating system.

§ getGamePath()

static String getGamePath ( )
static

Path string set by the game.

§ getPathSeparator()

static byte getPathSeparator ( )
static

Path list separator character for this operating system.

§ getSeparator()

static byte getSeparator ( )
static

Filepath separator character for this operating system.

§ getTypeOfFile()

static int getTypeOfFile ( String  path)
static

Type of file.

§ pathMatchesPattern()

static bool pathMatchesPattern ( String  string,
String  pattern 
)
static

Path matches a file pattern.

§ scanDirectory()

static void scanDirectory ( String  path,
Block  ablock 
)
static

Scan directory for files.

Each file entry is visited using the provided block with the file name relative to the search directory send to the block as String as only parameter.

Member Data Documentation

§ DIRECTORY

final int DIRECTORY = 1
static

Directory.

§ REGULAR_FILE

final int REGULAR_FILE = 0
static

Regular file.

§ SPECIAL

final int SPECIAL = 2
static

Special file which is neither a regular file nor a directory.


The documentation for this class was generated from the following file: