removed namespaces/filesystem/translations.yo

This commit is contained in:
Frank B. Brokken 2019-11-11 10:53:14 +05:30
parent 65357d4857
commit ca365ae400
2 changed files with 0 additions and 51 deletions

View file

@ -74,9 +74,6 @@ includefile(namespaces/filesystem/intro)
subsubsect(Obtaining the status of file system entries)
includefile(namespaces/filesystem/getstatus)
>> subsect(filesystem functions replacing often used C functions)
includefile(namespaces/filesystem/translations)
subsect(Information about the space of file systems: space_info)
includefile(namespaces/filesystem/spaceinfo)

View file

@ -1,48 +0,0 @@
Instead of using the traditional bf(C) functions for manipulating the file
system functions and members defined in the tt(std::filesystem) namespace can
be used. Here is an overvieuw of frequently used bf(C) functions and their
counterparts in the tt(std::filesystem) namespace (tt(fs) is defined as
tt(namespace fs = std::filesystem); tt(name) is either a NTBS
or a tt(std::string), or a tt(fs::path). When used with a traditional bf(C)
functions tt(name) is always an NTBS).
itemization(
ittq(access)(hi(access)
verb( fs::exists(name) - access()'s F_OK flag.
fs::file_status stat = fs::status(name);
exists(stat); - same
stat.type() != fs::file_type::not_found - same
fs::perms required = fs::perms::owner_read | fs::perms::owner_write;
(stat.permissions() & required) == required - access's R_OK | W_OK flags)
)
ittq(rename)(hi(rename)
For tt(fs::rename src) and tt(dest) can be NTBSs, tt(std::strings) or
tt(fs::path) objects. For the bf(C) tt(rename) function they must be
NTBSs.
verb( fs::rename(src, dest) - rename(src, dest)
error_code ec;
fs::rename(src, dest, ec) - same)
)
ittq(truncate)(hi(truncate)
The argument tt(size) is a tt(std::uintmax_t) value.
verb( fs::resize_file(name, size) - truncate(name, size)
error_code ec;
fs::resize_file(name, size, ec) - same)
)
ittq(unlink)(hi(unlink)
verb( fs::remove(name, size) - truncate(name, size)
error_code ec;
fs::resize_file(name, size, ec) - same)
)
)