diff options
| author | 2021-06-22 15:06:17 -0400 | |
|---|---|---|
| committer | 2021-06-22 15:07:51 -0400 | |
| commit | 2fa207058ba6cb1c4d519942e5543bd942f03f6c (patch) | |
| tree | 7231a2d3f66ed0781320ac429a711253dc4f193d /src | |
| parent | vfs_real: Fix Mode to FileAccessMode conversion (diff) | |
| download | yuzu-2fa207058ba6cb1c4d519942e5543bd942f03f6c.tar.gz yuzu-2fa207058ba6cb1c4d519942e5543bd942f03f6c.tar.xz yuzu-2fa207058ba6cb1c4d519942e5543bd942f03f6c.zip | |
common: fs: Add a description of a regular file in IsFile
This provides a more concrete example of what a regular file is and isn't.
Diffstat (limited to 'src')
| -rw-r--r-- | src/common/fs/fs.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/common/fs/fs.h b/src/common/fs/fs.h index a6c993962..183126de3 100644 --- a/src/common/fs/fs.h +++ b/src/common/fs/fs.h | |||
| @@ -48,7 +48,7 @@ template <typename Path> | |||
| 48 | * | 48 | * |
| 49 | * Failures occur when: | 49 | * Failures occur when: |
| 50 | * - Input path is not valid | 50 | * - Input path is not valid |
| 51 | * - Filesystem object at path is not a file | 51 | * - Filesystem object at path is not a regular file |
| 52 | * - Filesystem at path is read only | 52 | * - Filesystem at path is read only |
| 53 | * | 53 | * |
| 54 | * @param path Filesystem path | 54 | * @param path Filesystem path |
| @@ -74,7 +74,7 @@ bool RemoveFile(const Path& path) { | |||
| 74 | * Failures occur when: | 74 | * Failures occur when: |
| 75 | * - One or both input path(s) is not valid | 75 | * - One or both input path(s) is not valid |
| 76 | * - Filesystem object at old_path does not exist | 76 | * - Filesystem object at old_path does not exist |
| 77 | * - Filesystem object at old_path is not a file | 77 | * - Filesystem object at old_path is not a regular file |
| 78 | * - Filesystem object at new_path exists | 78 | * - Filesystem object at new_path exists |
| 79 | * - Filesystem at either path is read only | 79 | * - Filesystem at either path is read only |
| 80 | * | 80 | * |
| @@ -435,11 +435,13 @@ template <typename Path> | |||
| 435 | #endif | 435 | #endif |
| 436 | 436 | ||
| 437 | /** | 437 | /** |
| 438 | * Returns whether a filesystem object at path is a file. | 438 | * Returns whether a filesystem object at path is a regular file. |
| 439 | * A regular file is a file that stores text or binary data. | ||
| 440 | * It is not a directory, symlink, FIFO, socket, block device, or character device. | ||
| 439 | * | 441 | * |
| 440 | * @param path Filesystem path | 442 | * @param path Filesystem path |
| 441 | * | 443 | * |
| 442 | * @returns True if a filesystem object at path is a file, false otherwise. | 444 | * @returns True if a filesystem object at path is a regular file, false otherwise. |
| 443 | */ | 445 | */ |
| 444 | [[nodiscard]] bool IsFile(const std::filesystem::path& path); | 446 | [[nodiscard]] bool IsFile(const std::filesystem::path& path); |
| 445 | 447 | ||