This commit is contained in:
2025-10-25 03:02:53 +03:00
commit 043225d523
3416 changed files with 681196 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
[fs.op.is.block.file]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.block.file)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.block.file)
#### 31.12.13.17 Is block file [fs.op.is.block.file]
[🔗](#lib:is_block_file)
`bool filesystem::is_block_file(file_status s) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L17931)
*Returns*: s.type() == file_type::block[.](#1.sentence-1)
[🔗](#lib:is_block_file_)
`bool filesystem::is_block_file(const path& p);
bool filesystem::is_block_file(const path& p, error_code& ec) noexcept;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L17943)
*Returns*: is_block_file(status(p)) or is_block_file(status(p, ec)), respectively[.](#2.sentence-1)
The signature with argument ec returns false if an error occurs[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L17948)
*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5Error reporting")[.](#3.sentence-1)

View File

@@ -0,0 +1,44 @@
[fs.op.is.char.file]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.char.file)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.char.file)
#### 31.12.13.18 Is character file [fs.op.is.char.file]
[🔗](#lib:is_character_file)
`bool filesystem::is_character_file(file_status s) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L17962)
*Returns*: s.type() == file_type::character[.](#1.sentence-1)
[🔗](#lib:is_character_file_)
`bool filesystem::is_character_file(const path& p);
bool filesystem::is_character_file(const path& p, error_code& ec) noexcept;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L17974)
*Returns*: is_character_file(status(p)) or is_character_file(status(p, ec)),
respectively[.](#2.sentence-1)
The signature with argument ec returns false if an error occurs[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L17981)
*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5Error reporting")[.](#3.sentence-1)

View File

@@ -0,0 +1,41 @@
[fs.op.is.directory]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.directory)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.directory)
#### 31.12.13.19 Is directory [fs.op.is.directory]
[🔗](#lib:is_directory)
`bool filesystem::is_directory(file_status s) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L17995)
*Returns*: s.type() == file_type::directory[.](#1.sentence-1)
[🔗](#lib:is_directory_)
`bool filesystem::is_directory(const path& p);
bool filesystem::is_directory(const path& p, error_code& ec) noexcept;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18007)
*Returns*: is_directory(status(p)) or is_directory(status(p, ec)),
respectively[.](#2.sentence-1)
The signature with argument ec returns false if an error occurs[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18013)
*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5Error reporting")[.](#3.sentence-1)

View File

@@ -0,0 +1,71 @@
[fs.op.is.empty]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.empty)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.empty)
#### 31.12.13.20 Is empty [fs.op.is.empty]
[🔗](#lib:is_empty,function)
`bool filesystem::is_empty(const path& p);
bool filesystem::is_empty(const path& p, error_code& ec);
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18028)
*Effects*:
- [(1.1)](#1.1)
Determine file_status s,
as if by status(p) or status(p, ec), respectively[.](#1.1.sentence-1)
- [(1.2)](#1.2)
For the signature with argument ec,
return false if an error occurred[.](#1.2.sentence-1)
- [(1.3)](#1.3)
Otherwise, if is_directory(s):
* [(1.3.1)](#1.3.1)
Create a variable itr,
as if by directory_iterator itr(p) or directory_iterator itr(p, ec), respectively[.](#1.3.1.sentence-1)
* [(1.3.2)](#1.3.2)
For the signature with argument ec,
return false if an error occurred[.](#1.3.2.sentence-1)
* [(1.3.3)](#1.3.3)
Otherwise, return itr == directory_iterator()[.](#1.3.3.sentence-1)
- [(1.4)](#1.4)
Otherwise:
* [(1.4.1)](#1.4.1)
Determine uintmax_t sz,
as if by file_size(p) or file_size(p, ec), respectively[.](#1.4.1.sentence-1)
* [(1.4.2)](#1.4.2)
For the signature with argument ec,
return false if an error occurred[.](#1.4.2.sentence-1)
* [(1.4.3)](#1.4.3)
Otherwise, return sz == 0[.](#1.4.3.sentence-1)
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18055)
*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5Error reporting")[.](#2.sentence-1)

40
cppdraft/fs/op/is/fifo.md Normal file
View File

@@ -0,0 +1,40 @@
[fs.op.is.fifo]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.fifo)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.fifo)
#### 31.12.13.21 Is fifo [fs.op.is.fifo]
[🔗](#lib:is_fifo)
`bool filesystem::is_fifo(file_status s) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18069)
*Returns*: s.type() == file_type::fifo[.](#1.sentence-1)
[🔗](#lib:is_fifo_)
`bool filesystem::is_fifo(const path& p);
bool filesystem::is_fifo(const path& p, error_code& ec) noexcept;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18082)
*Returns*: is_fifo(status(p)) or is_fifo(status(p, ec)), respectively[.](#2.sentence-1)
The signature with argument ec returns false if an error occurs[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18087)
*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5Error reporting")[.](#3.sentence-1)

View File

@@ -0,0 +1,41 @@
[fs.op.is.other]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.other)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.other)
#### 31.12.13.22 Is other [fs.op.is.other]
[🔗](#lib:is_other)
`bool filesystem::is_other(file_status s) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18101)
*Returns*: exists(s) && !is_regular_file(s) && !is_directory(s) && !is_symlink(s)[.](#1.sentence-1)
[🔗](#lib:is_other_)
`bool filesystem::is_other(const path& p);
bool filesystem::is_other(const path& p, error_code& ec) noexcept;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18113)
*Returns*: is_other(status(p)) or is_other(status(p, ec)),
respectively[.](#2.sentence-1)
The signature with argument ec returns false if an error occurs[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18119)
*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5Error reporting")[.](#3.sentence-1)

View File

@@ -0,0 +1,64 @@
[fs.op.is.regular.file]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.regular.file)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.regular.file)
#### 31.12.13.23 Is regular file [fs.op.is.regular.file]
[🔗](#lib:is_regular_file)
`bool filesystem::is_regular_file(file_status s) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18133)
*Returns*: s.type() == file_type::regular[.](#1.sentence-1)
[🔗](#lib:is_regular_file_)
`bool filesystem::is_regular_file(const path& p);
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18144)
*Returns*: is_regular_file(status(p))[.](#2.sentence-1)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18148)
*Throws*: filesystem_error if status(p) would throw filesystem_error[.](#3.sentence-1)
[🔗](#lib:is_regular_file__)
`bool filesystem::is_regular_file(const path& p, error_code& ec) noexcept;
`
[4](#4)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18159)
*Effects*: Sets ec as if by status(p, ec)[.](#4.sentence-1)
[*Note [1](#note-1)*:
file_type::none, file_type::not_found and file_type::unknown cases set ec to error values[.](#4.sentence-2)
To distinguish between cases, call the status function directly[.](#4.sentence-3)
— *end note*]
[5](#5)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18167)
*Returns*: is_regular_file(status(p, ec))[.](#5.sentence-1)
Returns false if an error occurs[.](#5.sentence-2)

View File

@@ -0,0 +1,40 @@
[fs.op.is.socket]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.socket)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.socket)
#### 31.12.13.24 Is socket [fs.op.is.socket]
[🔗](#lib:is_socket)
`bool filesystem::is_socket(file_status s) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18182)
*Returns*: s.type() == file_type::socket[.](#1.sentence-1)
[🔗](#lib:is_socket_)
`bool filesystem::is_socket(const path& p);
bool filesystem::is_socket(const path& p, error_code& ec) noexcept;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18194)
*Returns*: is_socket(status(p)) or is_socket(status(p, ec)), respectively[.](#2.sentence-1)
The signature with argument ec returns false if an error occurs[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18200)
*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5Error reporting")[.](#3.sentence-1)

View File

@@ -0,0 +1,41 @@
[fs.op.is.symlink]
# 31 Input/output library [[input.output]](./#input.output)
## 31.12 File systems [[filesystems]](filesystems#fs.op.is.symlink)
### 31.12.13 Filesystem operation functions [[fs.op.funcs]](fs.op.funcs#fs.op.is.symlink)
#### 31.12.13.25 Is symlink [fs.op.is.symlink]
[🔗](#lib:is_symlink)
`bool filesystem::is_symlink(file_status s) noexcept;
`
[1](#1)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18214)
*Returns*: s.type() == file_type::symlink[.](#1.sentence-1)
[🔗](#lib:is_symlink_)
`bool filesystem::is_symlink(const path& p);
bool filesystem::is_symlink(const path& p, error_code& ec) noexcept;
`
[2](#2)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18226)
*Returns*: is_symlink(symlink_status(p)) or is_symlink(symlink_status(p, ec)),
respectively[.](#2.sentence-1)
The signature with argument ec returns false if an error occurs[.](#2.sentence-2)
[3](#3)
[#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/iostreams.tex#L18232)
*Throws*: As specified in [[fs.err.report]](fs.err.report "31.12.5Error reporting")[.](#3.sentence-1)