diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-10-06 02:31:12 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-10-09 01:20:06 +0200 |
| commit | d70c44e87632a69a2b8bc90db7ca4b06b7aa611d (patch) | |
| tree | 16a57ec08b57e5394ab2547d25cad820f2c75329 /src/filesystem.h | |
| parent | e4b2ebd80779a44d24fe87af26ef278c1e2d97d2 (diff) | |
Add more filesystem wrappers that DoM needs.v1.8.83
Diffstat (limited to 'src/filesystem.h')
| -rw-r--r-- | src/filesystem.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/filesystem.h b/src/filesystem.h index d9fb2791..53ec209d 100644 --- a/src/filesystem.h +++ b/src/filesystem.h @@ -46,17 +46,39 @@ namespace filesystem boost::filesystem::path absolute(boost::filesystem::path const& path); boost::filesystem::path canonical(boost::filesystem::path const& path); +boost::filesystem::path weakly_canonical(boost::filesystem::path const& path); +boost::filesystem::path change_extension(boost::filesystem::path const& from, std::string const& new_extension); void copy(boost::filesystem::path const& from, boost::filesystem::path const& to); void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to); +void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::system::error_code& ec); +void copy_file(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::filesystem::copy_option ec); bool create_directory(boost::filesystem::path const& path); +bool create_directory(boost::filesystem::path const& path, boost::system::error_code& ec); bool create_directories(boost::filesystem::path const& path); +bool create_directories(boost::filesystem::path const& path, boost::system::error_code& ec); void create_hard_link(boost::filesystem::path const& from, boost::filesystem::path const& to); +void create_hard_link(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::system::error_code& ec); +void create_symlink(boost::filesystem::path const& from, boost::filesystem::path const& to, boost::system::error_code& ec); void current_path(boost::filesystem::path const& path); boost::filesystem::path current_path(); bool exists(boost::filesystem::path const& path); +bool exists(boost::filesystem::path const& path, boost::system::error_code& ec); +std::string extension(boost::filesystem::path const& path); +bool is_directory(boost::filesystem::path const& path); +bool is_empty(boost::filesystem::path const& path); bool is_regular_file(boost::filesystem::path const& path); uintmax_t file_size(boost::filesystem::path const& path); +uintmax_t file_size(boost::filesystem::path const& path, boost::system::error_code& ec); +uintmax_t hard_link_count(boost::filesystem::path const& path); +std::time_t last_write_time(boost::filesystem::path const& path); +std::time_t last_write_time(boost::filesystem::path const& path, boost::system::error_code& ec); +bool remove(boost::filesystem::path const& path); +bool remove(boost::filesystem::path const& path, boost::system::error_code& ec); uintmax_t remove_all(boost::filesystem::path const& path); +uintmax_t remove_all(boost::filesystem::path const& path, boost::system::error_code& ec); +void rename(boost::filesystem::path const& old_path, boost::filesystem::path const& new_path); +void rename(boost::filesystem::path const& old_path, boost::filesystem::path const& new_path, boost::system::error_code& ec); +boost::filesystem::space_info space(boost::filesystem::path const& path); class directory_entry @@ -78,13 +100,16 @@ class directory_iterator public: directory_iterator() = default; directory_iterator(boost::filesystem::path const& path); + directory_iterator(boost::filesystem::path const& path, boost::system::error_code& ec); directory_iterator& operator++(); directory_entry operator*() const; + directory_entry* operator->() const; bool operator!=(directory_iterator const& other) const; private: boost::filesystem::directory_iterator _wrapped; + mutable directory_entry _entry; }; |
