From ca365ae400372cf319d81ac51e56369dc75e5b33 Mon Sep 17 00:00:00 2001 From: "Frank B. Brokken" Date: Mon, 11 Nov 2019 10:53:14 +0530 Subject: [PATCH] removed namespaces/filesystem/translations.yo --- annotations/yo/namespaces.yo | 3 -- .../yo/namespaces/filesystem/translations.yo | 48 ------------------- 2 files changed, 51 deletions(-) delete mode 100644 annotations/yo/namespaces/filesystem/translations.yo diff --git a/annotations/yo/namespaces.yo b/annotations/yo/namespaces.yo index e8e66f2c..4949dead 100644 --- a/annotations/yo/namespaces.yo +++ b/annotations/yo/namespaces.yo @@ -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) diff --git a/annotations/yo/namespaces/filesystem/translations.yo b/annotations/yo/namespaces/filesystem/translations.yo deleted file mode 100644 index 06600276..00000000 --- a/annotations/yo/namespaces/filesystem/translations.yo +++ /dev/null @@ -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) - -) - )