fs/FileSystem: add pure attributes

This commit is contained in:
Max Kellermann 2022-08-18 16:51:09 +02:00
parent 71acad6c21
commit f883c09b6b
1 changed files with 4 additions and 0 deletions

View File

@ -98,6 +98,7 @@ MakeFifo(Path path, mode_t mode) noexcept
/**
* Wrapper for access() that uses #Path names.
*/
[[gnu::pure]]
static inline bool
CheckAccess(Path path, int mode) noexcept
{
@ -109,6 +110,7 @@ CheckAccess(Path path, int mode) noexcept
/**
* Checks if #Path exists and is a regular file.
*/
[[gnu::pure]]
static inline bool
FileExists(Path path, bool follow_symlinks = true) noexcept
{
@ -127,6 +129,7 @@ FileExists(Path path, bool follow_symlinks = true) noexcept
/**
* Checks if #Path exists and is a directory.
*/
[[gnu::pure]]
static inline bool
DirectoryExists(Path path, bool follow_symlinks = true) noexcept
{
@ -144,6 +147,7 @@ DirectoryExists(Path path, bool follow_symlinks = true) noexcept
/**
* Checks if #Path exists.
*/
[[gnu::pure]]
static inline bool
PathExists(Path path) noexcept
{