summaryrefslogtreecommitdiffstats
path: root/src/common/fs/file.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2021-07-07 09:40:31 +0200
committerGitHub <noreply@github.com>2021-07-07 09:40:31 +0200
commit2eb018c80fd2a83686ee11a80c7427a98ea44354 (patch)
treea062eae0798d08a88411642490c2fef96b082dc6 /src/common/fs/file.h
parentMerge pull request #6497 from FernandoS27/scotty-doesnt-know (diff)
parentcommon: logging: backend: Close the file after exceeding the write limit (diff)
downloadyuzu-2eb018c80fd2a83686ee11a80c7427a98ea44354.tar
yuzu-2eb018c80fd2a83686ee11a80c7427a98ea44354.tar.gz
yuzu-2eb018c80fd2a83686ee11a80c7427a98ea44354.tar.bz2
yuzu-2eb018c80fd2a83686ee11a80c7427a98ea44354.tar.lz
yuzu-2eb018c80fd2a83686ee11a80c7427a98ea44354.tar.xz
yuzu-2eb018c80fd2a83686ee11a80c7427a98ea44354.tar.zst
yuzu-2eb018c80fd2a83686ee11a80c7427a98ea44354.zip
Diffstat (limited to 'src/common/fs/file.h')
-rw-r--r--src/common/fs/file.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/common/fs/file.h b/src/common/fs/file.h
index 588fe619d..2c4ab4332 100644
--- a/src/common/fs/file.h
+++ b/src/common/fs/file.h
@@ -396,13 +396,22 @@ public:
[[nodiscard]] size_t WriteString(std::span<const char> string) const;
/**
- * Attempts to flush any unwritten buffered data into the file and flush the file into the disk.
+ * Attempts to flush any unwritten buffered data into the file.
*
* @returns True if the flush was successful, false otherwise.
*/
bool Flush() const;
/**
+ * Attempts to commit the file into the disk.
+ * Note that this is an expensive operation as this forces the operating system to write
+ * the contents of the file associated with the file descriptor into the disk.
+ *
+ * @returns True if the commit was successful, false otherwise.
+ */
+ bool Commit() const;
+
+ /**
* Resizes the file to a given size.
* If the file is resized to a smaller size, the remainder of the file is discarded.
* If the file is resized to a larger size, the new area appears as if zero-filled.