aboutsummaryrefslogtreecommitdiff
path: root/src/os/fs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/os/fs.c')
-rw-r--r--src/os/fs.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/os/fs.c b/src/os/fs.c
index e03d06669d..c245890873 100644
--- a/src/os/fs.c
+++ b/src/os/fs.c
@@ -189,6 +189,16 @@ int os_file_is_writable(const char *name)
return 0;
}
+bool os_get_file_size(const char *name, off_t *size)
+{
+ uv_stat_t statbuf;
+ if (os_stat((char_u *)name, &statbuf) == OK) {
+ *size = statbuf.st_size;
+ return true;
+ }
+ return false;
+}
+
int os_rename(const char_u *path, const char_u *new_path)
{
uv_fs_t request;