Contains file native API.
- Namespace
- xtd::native
- Library
- xtd.core.native
- Warning
- Internal use only
|
static int32_t | copy (const std::string &source_file, const std::string &target_file) |
| Copy a specified source file to a target file.
|
|
static bool | exists (const std::string &path) |
| Check if specified file exist.
|
|
static size_t | get_size (const std::string &path) |
| Gets file size of specified path.
|
|
static int32_t | move (const std::string &old_path, const std::string &new_path) |
| Moves a file or a directory and its contents to a new location.
|
|
static int32_t | remove (const std::string &file) |
| Permanently deletes a speccified file.
|
|
◆ copy()
static int32_t xtd::native::file::copy |
( |
const std::string & |
source_file, |
|
|
const std::string & |
target_file |
|
) |
| |
|
staticprotected |
Copy a specified source file to a target file.
- Parameters
-
source_file | The source file to copy. |
target_file | The target file where copy. |
- Returns
- 0 if success; otherwise failed.
- Warning
- Internal use only
◆ exists()
static bool xtd::native::file::exists |
( |
const std::string & |
path | ) |
|
|
staticprotected |
Check if specified file exist.
- Parameters
-
path | The file path to check. |
- Returns
- true is file exist; otherwise false.
- Warning
- Internal use only
◆ get_size()
static size_t xtd::native::file::get_size |
( |
const std::string & |
path | ) |
|
|
staticprotected |
Gets file size of specified path.
- Parameters
-
path | The relative or absolute path to the directory to get size. |
- Returns
- The file size.
- Warning
- Internal use only
◆ move()
static int32_t xtd::native::file::move |
( |
const std::string & |
old_path, |
|
|
const std::string & |
new_path |
|
) |
| |
|
staticprotected |
Moves a file or a directory and its contents to a new location.
- Parameters
-
old_path | The path of the file or directory to move. |
new_path | The path to the new location for old_path. If old_path is a file, then new_path must also be a file name. |
- Returns
- 0 if success; otherwise failed.
- Warning
- Internal use only
◆ remove()
static int32_t xtd::native::file::remove |
( |
const std::string & |
file | ) |
|
|
staticprotected |
Permanently deletes a speccified file.
- Parameters
-
file | The file name to delete. |
- Returns
- 0 if success; otherwise failed.
- Warning
- Internal use only
The documentation for this class was generated from the following file:
- xtd.core.native/include/xtd/native/file.hpp