This page has been translated automatically.
UnigineScript
The Language
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
Usage Examples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Migration
Migrating to UNIGINE 2.0
C++ API Migration
Migrating from UNIGINE 2.0 to UNIGINE 2.1
Warning! This version of documentation is OUTDATED, as it describes an older SDK version! Please switch to the documentation for the latest SDK version.
Warning! This version of documentation describes an old SDK version which is no longer supported! Please upgrade to the latest SDK version.

Dir Class

Dir Class

Members


Dir ()

Default constructor.

Dir (variable path)

Constructor. Creates a new directory instance.

Arguments

  • variable path - Directory path to open.

void close ()

Closes the directory descriptor.

string getDirName (int num)

Returns name of the directory with given index.

Arguments

  • int num - Directory index.

Return value

Name of the directory with num index.

long getFileMTime (int num)

Returns the time of the file last modification.

Arguments

  • int num - File index.

Return value

Time of the last modification.

string getFileName (int num)

Returns name of the file with given index.

Arguments

  • int num - File index.

Return value

Name of the file with num index.

int getFileSize (int num)

Returns the size of the file with the given index.

Arguments

  • int num - File index.

Return value

File size.

string getName ()

Returns the name of the current directory.

Return value

Directory name.

int getNumDirs ()

Returns number of nested directories.

Return value

Number of directories.

int getNumFiles ()

Returns number of files inside the directory.

Return value

Number of files.

int getSize ()

Returns the size of the current directory.

Return value

Directory size.

int isOpened ()

Checks whether the directory is opened.

Return value

1 if the directory is opened; otherwise, 0.

int open (string name)

Opens the directory.

Arguments

  • string name - Directory path.

Return value

Directory descriptor.
Last update: 2017-07-03
Build: ()