This page has been translated automatically.
编程
Fundamentals
Setting Up Development Environment
Usage Examples
UnigineScript
High-Level Systems
C++
C#
UUSL (Unified UNIGINE Shader Language)
File Formats
Rebuilding the Engine and Tools
GUI
Double Precision Coordinates
应用程序接口
Containers
Common Functionality
Controls-Related Classes
Engine-Related Classes
GUI-Related Classes
Math Functionality
Node-Related Classes
Networking Functionality
Pathfinding-Related Classes
Physics-Related Classes
Plugins-Related Classes
Rendering-Related Classes
注意! 这个版本的文档是过时的,因为它描述了一个较老的SDK版本!请切换到最新SDK版本的文档。
注意! 这个版本的文档描述了一个不再受支持的旧SDK版本!请升级到最新的SDK版本。

Unigine::Dir Class

Header:#include <UnigineDir.h>

Dir Class

Members


static DirPtr create()

Default constructor.

static DirPtr create(const char * name)

Constructor. Creates a new directory instance.

Arguments

  • const char * name - Directory path to open.

const char * 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 long getFileMTime(int num)

Returns the time of the file last modification.

Arguments

  • int num - File index.

Return value

Time of the last modification.

const char * 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.

size_t getFileSize(int num)

Returns the size of the file with the given index.

Arguments

  • int num - File index.

Return value

File size.

int setMTime(const char * name, long long value)

Arguments

  • const char * name
  • long long value

long long getMTime(const char * name)

Arguments

  • const char * name

const char * 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.

size_t getSize()

Returns the size of the current directory.

Return value

Directory size.

int close()

Closes the directory descriptor.

Return value

1 if the directory descriptory is closed sucessfully; otherwise - 0.

int open(const char * name)

Opens the directory.

Arguments

  • const char * name - Directory path.

Return value

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