summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/core.c b/src/core.c
index 3b54c05c..7162f47d 100644
--- a/src/core.c
+++ b/src/core.c
@@ -1682,15 +1682,18 @@ void ClearDroppedFiles(void)
#endif
}
-// Get the last write time of a file
-long GetLastWriteTime(const char *fileName)
+// Get file modification time (last write time)
+RLAPI long GetFileModTime(const char *fileName)
{
- struct stat result = {0};
+ struct stat result = { 0 };
+
if (stat(fileName, &result) == 0)
{
time_t mod = result.st_mtime;
- return mod;
+
+ return (long)mod;
}
+
return 0;
}