summaryrefslogtreecommitdiff
path: root/src/file.hh
diff options
context:
space:
mode:
authorFrank LENORMAND <lenormf@gmail.com>2019-11-23 15:55:46 +0100
committerFrank LENORMAND <lenormf@gmail.com>2019-12-03 17:05:24 +0100
commite1bd076f5e64010578b904ad4bbb25b462517ef3 (patch)
treedd5bf7dea95a2e58a8342bd0a10c01166232a25a /src/file.hh
parent936bd923eae554d83dc77ab788d84b6d83c108f9 (diff)
src: Reload buffers when their contents' hash changes
Instead of triggering a reload event when the timestamp of a buffer's underlying file changes, do so when its contents are actually modified.
Diffstat (limited to 'src/file.hh')
-rw-r--r--src/file.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/file.hh b/src/file.hh
index a0e4e855..aa32b01d 100644
--- a/src/file.hh
+++ b/src/file.hh
@@ -86,7 +86,15 @@ Vector<String> list_files(StringView directory);
void make_directory(StringView dir, mode_t mode);
+struct FsStatus
+{
+ timespec timestamp;
+ ByteCount file_size;
+ size_t hash;
+};
+
timespec get_fs_timestamp(StringView filename);
+FsStatus get_fs_status(StringView filename);
constexpr bool operator==(const timespec& lhs, const timespec& rhs)
{