This page has been translated automatically.
UnigineScript
The Language
Engine Library
Node-Related Classes
GUI-Related Classes
Plugins Library
High-Level Systems
Samples
C++ API
API Reference
Integration Samples
Usage Examples
C++ Plugins
Content Creation
Materials
Unigine Material Library
Tutorials
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

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.

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.

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 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: ()