xtd 0.2.0
Loading...
Searching...
No Matches
file_system.h
Go to the documentation of this file.
1
4#pragma once
6#if !defined(__XTD_CORE_NATIVE_LIBRARY__)
7#error "Do not include this file: Internal use only"
8#endif
10
11#include "file_attribute.h"
12#include <xtd/core_native_export>
13#include <cstdint>
14#include <ctime>
15#include <string>
16
18namespace xtd {
20 namespace io {
21 class directory;
22 class directory_info;
23 class file;
24 class file_info;
25 class file_system_info;
26 class path;
27
28 }
30
33 namespace native {
35 class directory;
36 class drive;
37 class file;
38 class speech_synthesizer;
40
48 class core_native_export_ file_system final {
49 file_system() = delete;
50 friend xtd::io::directory;
52 friend xtd::io::file;
53 friend xtd::io::file_info;
55 friend xtd::io::path;
57 friend xtd::native::drive;
58 friend xtd::native::file;
60 protected:
62
69 static int32_t get_attributes(const std::string& path, int32_t& attributes);
77 static int32_t get_file_times(const std::string& path, time_t& creation_time, time_t& last_access_time, time_t& last_write_time);
82 static std::string get_full_path(const std::string& relative_path);
87 static bool is_path_too_long(const std::string& path);
93 static int32_t set_attributes(const std::string& path, int32_t attributes);
99 static int32_t set_creation_time(const std::string& path, time_t creation_time);
105 static int32_t set_last_access_time(const std::string& path, time_t last_access_time);
111 static int32_t set_last_write_time(const std::string& path, time_t last_write_time);
117 static int32_t get_permissions(const std::string& path, int32_t& permissions);
123 static int32_t set_permissions(const std::string& path, int32_t permissions);
125 };
126 }
127}
Exposes instance methods for creating, moving, and enumerating through directories and subdirectories...
Definition directory_info.h:129
Exposes static methods for creating, moving, and enumerating through directories and subdirectories....
Definition directory.h:101
Provides static methods for the creation, copying, deletion, moving, and opening of files,...
Definition file_info.h:41
Provides the base class for both xtd::io::file_info and xtd::io::directory_info objects.
Definition file_system_info.h:87
Provides static methods for the creation, copying, deletion, moving, and opening of files,...
Definition file.h:39
Performs operations on std::basic_string instances that contain file or directory path information....
Definition path.h:36
Contains directory native API.
Definition directory.h:43
Contains drive native API.
Definition drive.h:35
Contains file_system native API.
Definition file_system.h:48
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 std::string get_full_path(const std::string &relative_path)
Gets full path of specified 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 int32_t get_attributes(const std::string &path, int32_t &attributes)
Gets the attributes 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.
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 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 get_permissions(const std::string &path, int32_t &permissions)
Gets the permissions 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.
Contains file native API.
Definition file.h:35
Contains path native API.
Definition path.h:38
Contains path native API.
Definition speech_synthesizer.h:39
Contains console file attribute constants.
@ path
The xtd::uri::local_path data.
@ directory
The file is a directory.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10