summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/fs_ops.h
diff options
context:
space:
mode:
Diffstat (limited to 'libstdc++-v3/include/bits/fs_ops.h')
-rw-r--r--libstdc++-v3/include/bits/fs_ops.h79
1 files changed, 79 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/fs_ops.h b/libstdc++-v3/include/bits/fs_ops.h
index 0281c6540d0..1ae8fe12374 100644
--- a/libstdc++-v3/include/bits/fs_ops.h
+++ b/libstdc++-v3/include/bits/fs_ops.h
@@ -44,10 +44,16 @@ namespace filesystem
* @{
*/
+ [[nodiscard]]
path absolute(const path& __p);
+
+ [[nodiscard]]
path absolute(const path& __p, error_code& __ec);
+ [[nodiscard]]
path canonical(const path& __p);
+
+ [[nodiscard]]
path canonical(const path& __p, error_code& __ec);
inline void
@@ -100,25 +106,34 @@ namespace filesystem
void create_symlink(const path& __to, const path& __new_symlink,
error_code& __ec) noexcept;
+ [[nodiscard]]
path current_path();
+
+ [[nodiscard]]
path current_path(error_code& __ec);
+
void current_path(const path& __p);
void current_path(const path& __p, error_code& __ec) noexcept;
+ [[nodiscard]]
bool
equivalent(const path& __p1, const path& __p2);
+ [[nodiscard]]
bool
equivalent(const path& __p1, const path& __p2, error_code& __ec) noexcept;
+ [[nodiscard]]
inline bool
exists(file_status __s) noexcept
{ return status_known(__s) && __s.type() != file_type::not_found; }
+ [[nodiscard]]
inline bool
exists(const path& __p)
{ return exists(status(__p)); }
+ [[nodiscard]]
inline bool
exists(const path& __p, error_code& __ec) noexcept
{
@@ -131,63 +146,85 @@ namespace filesystem
return false;
}
+ [[nodiscard]]
uintmax_t file_size(const path& __p);
+
+ [[nodiscard]]
uintmax_t file_size(const path& __p, error_code& __ec) noexcept;
+ [[nodiscard]]
uintmax_t hard_link_count(const path& __p);
+
+ [[nodiscard]]
uintmax_t hard_link_count(const path& __p, error_code& __ec) noexcept;
+ [[nodiscard]]
inline bool
is_block_file(file_status __s) noexcept
{ return __s.type() == file_type::block; }
+ [[nodiscard]]
inline bool
is_block_file(const path& __p)
{ return is_block_file(status(__p)); }
+ [[nodiscard]]
inline bool
is_block_file(const path& __p, error_code& __ec) noexcept
{ return is_block_file(status(__p, __ec)); }
+ [[nodiscard]]
inline bool
is_character_file(file_status __s) noexcept
{ return __s.type() == file_type::character; }
+ [[nodiscard]]
inline bool
is_character_file(const path& __p)
{ return is_character_file(status(__p)); }
+ [[nodiscard]]
inline bool
is_character_file(const path& __p, error_code& __ec) noexcept
{ return is_character_file(status(__p, __ec)); }
+ [[nodiscard]]
inline bool
is_directory(file_status __s) noexcept
{ return __s.type() == file_type::directory; }
+ [[nodiscard]]
inline bool
is_directory(const path& __p)
{ return is_directory(status(__p)); }
+ [[nodiscard]]
inline bool
is_directory(const path& __p, error_code& __ec) noexcept
{ return is_directory(status(__p, __ec)); }
+ [[nodiscard]]
bool is_empty(const path& __p);
+
+ [[nodiscard]]
bool is_empty(const path& __p, error_code& __ec);
+ [[nodiscard]]
inline bool
is_fifo(file_status __s) noexcept
{ return __s.type() == file_type::fifo; }
+ [[nodiscard]]
inline bool
is_fifo(const path& __p)
{ return is_fifo(status(__p)); }
+ [[nodiscard]]
inline bool
is_fifo(const path& __p, error_code& __ec) noexcept
{ return is_fifo(status(__p, __ec)); }
+ [[nodiscard]]
inline bool
is_other(file_status __s) noexcept
{
@@ -195,52 +232,67 @@ namespace filesystem
&& !is_symlink(__s);
}
+ [[nodiscard]]
inline bool
is_other(const path& __p)
{ return is_other(status(__p)); }
+ [[nodiscard]]
inline bool
is_other(const path& __p, error_code& __ec) noexcept
{ return is_other(status(__p, __ec)); }
+ [[nodiscard]]
inline bool
is_regular_file(file_status __s) noexcept
{ return __s.type() == file_type::regular; }
+ [[nodiscard]]
inline bool
is_regular_file(const path& __p)
{ return is_regular_file(status(__p)); }
+ [[nodiscard]]
inline bool
is_regular_file(const path& __p, error_code& __ec) noexcept
{ return is_regular_file(status(__p, __ec)); }
+ [[nodiscard]]
inline bool
is_socket(file_status __s) noexcept
{ return __s.type() == file_type::socket; }
+ [[nodiscard]]
inline bool
is_socket(const path& __p)
{ return is_socket(status(__p)); }
+ [[nodiscard]]
inline bool
is_socket(const path& __p, error_code& __ec) noexcept
{ return is_socket(status(__p, __ec)); }
+ [[nodiscard]]
inline bool
is_symlink(file_status __s) noexcept
{ return __s.type() == file_type::symlink; }
+ [[nodiscard]]
inline bool
is_symlink(const path& __p)
{ return is_symlink(symlink_status(__p)); }
+ [[nodiscard]]
inline bool
is_symlink(const path& __p, error_code& __ec) noexcept
{ return is_symlink(symlink_status(__p, __ec)); }
+ [[nodiscard]]
file_time_type last_write_time(const path& __p);
+
+ [[nodiscard]]
file_time_type last_write_time(const path& __p, error_code& __ec) noexcept;
+
void last_write_time(const path& __p, file_time_type __new_time);
void last_write_time(const path& __p, file_time_type __new_time,
error_code& __ec) noexcept;
@@ -257,19 +309,30 @@ namespace filesystem
permissions(const path& __p, perms __prms, perm_options __opts,
error_code& __ec) noexcept;
+ [[nodiscard]]
inline path proximate(const path& __p, error_code& __ec)
{ return proximate(__p, current_path(), __ec); }
+ [[nodiscard]]
path proximate(const path& __p, const path& __base = current_path());
+
+ [[nodiscard]]
path proximate(const path& __p, const path& __base, error_code& __ec);
+ [[nodiscard]]
path read_symlink(const path& __p);
+
+ [[nodiscard]]
path read_symlink(const path& __p, error_code& __ec);
+ [[nodiscard]]
inline path relative(const path& __p, error_code& __ec)
{ return relative(__p, current_path(), __ec); }
+ [[nodiscard]]
path relative(const path& __p, const path& __base = current_path());
+
+ [[nodiscard]]
path relative(const path& __p, const path& __base, error_code& __ec);
bool remove(const path& __p);
@@ -284,22 +347,38 @@ namespace filesystem
void resize_file(const path& __p, uintmax_t __size);
void resize_file(const path& __p, uintmax_t __size, error_code& __ec) noexcept;
+ [[nodiscard]]
space_info space(const path& __p);
+
+ [[nodiscard]]
space_info space(const path& __p, error_code& __ec) noexcept;
+ [[nodiscard]]
file_status status(const path& __p);
+
+ [[nodiscard]]
file_status status(const path& __p, error_code& __ec) noexcept;
+ [[nodiscard]]
inline bool status_known(file_status __s) noexcept
{ return __s.type() != file_type::none; }
+ [[nodiscard]]
file_status symlink_status(const path& __p);
+
+ [[nodiscard]]
file_status symlink_status(const path& __p, error_code& __ec) noexcept;
+ [[nodiscard]]
path temp_directory_path();
+
+ [[nodiscard]]
path temp_directory_path(error_code& __ec);
+ [[nodiscard]]
path weakly_canonical(const path& __p);
+
+ [[nodiscard]]
path weakly_canonical(const path& __p, error_code& __ec);
/// @} group filesystem