1 #ifndef LIBFILEZILLA_LOCAL_FILESYS_HEADER
2 #define LIBFILEZILLA_LOCAL_FILESYS_HEADER
4 #include "fsresult.hpp"
9 #include "glue/windows.hpp"
53 return c ==
'/' || c ==
'\\';
62 static type get_file_type(
native_string const& path,
bool follow_links =
false);
72 static type get_file_info(
native_string const& path,
bool &is_link, int64_t* size,
datetime* modification_time,
int* mode,
bool follow_links =
true);
75 static int64_t get_size(
native_string const& path,
bool *is_link =
nullptr);
80 result begin_find_files(
native_string path,
bool dirs_only =
false,
bool query_symlink_targets =
true);
88 result begin_find_files(HANDLE dir,
bool dirs_only =
false,
bool query_symlink_targets =
true);
95 result begin_find_files(
int fd,
bool dirs_only =
false,
bool query_symlink_targets =
true);
110 bool get_next_file(
native_string& name,
bool &is_link, type & t, int64_t* size,
datetime* modification_time,
int* mode);
113 void end_find_files();
123 bool FZ_PRIVATE_SYMBOL check_buffer();
124 std::vector<unsigned char> buffer_;
125 unsigned char* cur_{};
126 HANDLE dir_{INVALID_HANDLE_VALUE};
133 bool query_symlink_targets_{
true};
Only current user and administrators.
result rename_file(native_string const &source, native_string const &dest, bool allow_copy=true)
Rename/move the passed file or directory.
result remove_dir(native_string const &absolute_path)
Removes sempty directory.
Represents a point of time in wallclock, tracking the timestamps accuracy/precision.
Definition: time.hpp:40
Assorted classes dealing with time.
Small class to return filesystem errors.
Definition: fsresult.hpp:21
static char const path_separator
The system's preferred path separator.
Definition: local_filesys.hpp:46
This class can be used to enumerate the contents of local directories and to query the metadata of fi...
Definition: local_filesys.hpp:25
std::wstring native_string
A string in the system's native character type and encoding. Note: This typedef changes depending on...
Definition: string.hpp:33
The namespace used by libfilezilla.
Definition: apply.hpp:17
Lean class for file access.
Definition: file.hpp:28
mkdir_permissions
Definition: local_filesys.hpp:136
static bool is_separator(wchar_t c)
Checks whether given character is a path separator.
Definition: local_filesys.hpp:51
Sets some global macros and further includes string.hpp.
result mkdir(native_string const &absolute_path, bool recurse, mkdir_permissions permissions=mkdir_permissions::normal, native_string *last_created=nullptr)
Creates directory if it doesn't yet exist.
type
Types of files. While 'everything is a file', a filename can refer to a file proper, a directory or a symbolic link.
Definition: local_filesys.hpp:38