summaryrefslogtreecommitdiff
path: root/os.h
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-01-08 18:48:39 -0500
committerpommicket <pommicket@gmail.com>2023-01-09 13:24:08 -0500
commitc7e80603848df006dc2a3b341063bec1b35ba811 (patch)
tree1624ca42731a856a0d499a339b971ec1cef3b2e0 /os.h
parent1051788217ead36b554efe38259dfd257e851fc2 (diff)
start windows fix
Diffstat (limited to 'os.h')
-rw-r--r--os.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/os.h b/os.h
index d2920db..a670a6b 100644
--- a/os.h
+++ b/os.h
@@ -43,6 +43,11 @@ int fs_mkdir(const char *path);
// 0 if buf is too short to hold the cwd
// -1 if we can't get the cwd for whatever reason.
int os_get_cwd(char *buf, size_t buflen);
+// Unlike ISO C rename() function, this will overwrite `newname` if it exists.
+// Returns:
+// >= 0 if successful
+// < 0 on error
+int os_rename_overwrite(const char *oldname, const char *newname);
struct timespec time_last_modified(const char *filename);
struct timespec time_get(void);
// sleep for a certain number of nanoseconds