You.i Engine
CYIDir Class Reference

Detailed Description

This class provides functionality for working with directories.

#include <utility/YiDir.h>

Static Public Member Functions

static const CYIStringGetSeparator ()
static std::vector< CYIStringGetListing (const CYIString &directoryName)
static bool AreDirectoryOperationsSupported ()
static bool DirectoryExists (const CYIString &path)
static bool IsDirectory (const CYIString &path)
static bool CreateDirectory (const CYIString &path, bool createParents=false)
static bool RemoveDirectory (const CYIString &path)

Member Function Documentation

◆ AreDirectoryOperationsSupported()

static bool CYIDir::AreDirectoryOperationsSupported ( )

Returns true if directories can be queried, created and destroyed.

◆ CreateDirectory()

static bool CYIDir::CreateDirectory ( const CYIString path,
bool  createParents = false 

Creates the final directory in an absolute or relative path. If createParents is true, also creates all listed directories leading up to the final directory. Returns true if directory exists or has been created.

◆ DirectoryExists()

static bool CYIDir::DirectoryExists ( const CYIString path)

Returns true if directory exists at the absolute or relative path specified (and is actually a directory).

This function is deprecated and may be removed in a future release. IsDirectory should be used instead.

◆ GetListing()

static std::vector<CYIString> CYIDir::GetListing ( const CYIString directoryName)

Returns a list of files and folders contained in the directory specified by directoryName.

The list will be empty if the directory is empty, the specified path is not a directory, or the specified path does not exist.

On the Tizen platform this method will only return a listing of files which have been accessed previously in the application's current session. This is a limitation due to the sandboxed file system used by the NaCl environment on Tizen.

◆ GetSeparator()

static const CYIString& CYIDir::GetSeparator ( )

Returns the native directory separator character for the current platform. On Windows, it would be '\' and on Unix and Unix-derivative systems it would be '/'.

◆ IsDirectory()

static bool CYIDir::IsDirectory ( const CYIString path)

Returns true if the file at path exists and is a directory. Absolute and relative paths are supported.

See also

◆ RemoveDirectory()

static bool CYIDir::RemoveDirectory ( const CYIString path)

Removes the final directory in an absolute or relative path if it is empty. Returns true if removal is successful.

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