xtd 0.2.0
Loading...
Searching...
No Matches
xtd::native::file_system Class Referencefinal

Definition

Contains file_system native API.

Namespace
xtd::native
Library
xtd.core.native
Warning
Internal use only

Protected Static Methods

static int32_t get_attributes (const std::string &path, int32_t &attributes)
 Gets the attributes for the specified file or directory path.
 
static int32_t get_file_times (const std::string &path, time_t &creation_time, time_t &last_access_time, time_t &last_write_time)
 Gets file creeation time, last access time and lastt write time of specified path.
 
static std::string get_full_path (const std::string &relative_path)
 Gets full path of specified path.
 
static bool is_path_too_long (const std::string &path)
 Check if specified path is too long for the OS.
 
static int32_t set_attributes (const std::string &path, int32_t attributes)
 Sets the attributes for the specified file or directory path.
 
static int32_t set_creation_time (const std::string &path, time_t creation_time)
 Sets the creation time for the specified file or directory path.
 
static int32_t set_last_access_time (const std::string &path, time_t last_access_time)
 Sets the last access time for the specified file or directory path.
 
static int32_t set_last_write_time (const std::string &path, time_t last_write_time)
 Sets the last write time for the specified file or directory path.
 
static int32_t get_permissions (const std::string &path, int32_t &permissions)
 Gets the permissions for the specified file or directory path.
 
static int32_t set_permissions (const std::string &path, int32_t permissions)
 Sets the permissions for the specified file or directory path.
 

Member Function Documentation

◆ get_attributes()

static int32_t xtd::native::file_system::get_attributes ( const std::string &  path,
int32_t &  attributes 
)
staticprotected

Gets the attributes for the specified file or directory path.

Parameters
pathThe relative or absolute path to the directory to get attribute.
attributeThe file or path attribute. (see file_attribute.h)
Returns
0 if success; otherwise failed.
Warning
Internal use only

◆ get_file_times()

static int32_t xtd::native::file_system::get_file_times ( const std::string &  path,
time_t &  creation_time,
time_t &  last_access_time,
time_t &  last_write_time 
)
staticprotected

Gets file creeation time, last access time and lastt write time of specified path.

Parameters
pathThe relative or absolute path to the directory to get times.
creation_timeThat contains the creation time.
last_access_timeThat contains the last access time.
last_write_timeThat contains the last write time.
Returns
0 if success; otherwise failed.
Warning
Internal use only

◆ get_full_path()

static std::string xtd::native::file_system::get_full_path ( const std::string &  relative_path)
staticprotected

Gets full path of specified path.

Parameters
relative_pathThe relative path to the directory to search.
Returns
The fulll path.
Warning
Internal use only

◆ is_path_too_long()

static bool xtd::native::file_system::is_path_too_long ( const std::string &  path)
staticprotected

Check if specified path is too long for the OS.

Parameters
pathThe path to cjheck the size.
Returns
true if path too long; otherwiser false.
Warning
Internal use only

◆ set_attributes()

static int32_t xtd::native::file_system::set_attributes ( const std::string &  path,
int32_t  attributes 
)
staticprotected

Sets the attributes for the specified file or directory path.

Parameters
pathThe relative or absolute path to the directory to get attribute.
attributeThe file or path attribute. (see file_attribute.h)
Returns
0 if success; -1 operation is not supported; otherwise failed.
Warning
Internal use only

◆ set_creation_time()

static int32_t xtd::native::file_system::set_creation_time ( const std::string &  path,
time_t  creation_time 
)
staticprotected

Sets the creation time for the specified file or directory path.

Parameters
pathThe relative or absolute path to the directory to get attribute.
creation_timeThe file or path creation time.
Returns
0 if success; -1 operation is not supported; otherwise failed.
Warning
Internal use only

◆ set_last_access_time()

static int32_t xtd::native::file_system::set_last_access_time ( const std::string &  path,
time_t  last_access_time 
)
staticprotected

Sets the last access time for the specified file or directory path.

Parameters
pathThe relative or absolute path to the directory to get attribute.
last_access_timeThe file or path last access time.
Returns
0 if success; -1 operation is not supported; otherwise failed.
Warning
Internal use only

◆ set_last_write_time()

static int32_t xtd::native::file_system::set_last_write_time ( const std::string &  path,
time_t  last_write_time 
)
staticprotected

Sets the last write time for the specified file or directory path.

Parameters
pathThe relative or absolute path to the directory to get attribute.
last_write_timeThe file or path last write time.
Returns
0 if success; -1 operation is not supported; otherwise failed.
Warning
Internal use only

◆ get_permissions()

static int32_t xtd::native::file_system::get_permissions ( const std::string &  path,
int32_t &  permissions 
)
staticprotected

Gets the permissions for the specified file or directory path.

Parameters
pathThe relative or absolute path to the directory to get attribute.
attributeThe file or path permissions. (see file_permission.h)
Returns
0 if success; otherwise failed.
Warning
Internal use only

◆ set_permissions()

static int32_t xtd::native::file_system::set_permissions ( const std::string &  path,
int32_t  permissions 
)
staticprotected

Sets the permissions for the specified file or directory path.

Parameters
pathThe relative or absolute path to the directory to get attribute.
attributeThe file or path permissions. (see file_permission.h)
Returns
0 if success; otherwise failed.
Warning
Internal use only

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