Renamed new PR function
RENAME: GetLastWriteTime() to GetFileModTime()
This commit is contained in:
parent
fc4e9e7a37
commit
c7b601b624
2 changed files with 8 additions and 5 deletions
11
src/core.c
11
src/core.c
|
@ -1682,15 +1682,18 @@ void ClearDroppedFiles(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the last write time of a file
|
// Get file modification time (last write time)
|
||||||
long GetLastWriteTime(const char *fileName)
|
RLAPI long GetFileModTime(const char *fileName)
|
||||||
{
|
{
|
||||||
struct stat result = {0};
|
struct stat result = { 0 };
|
||||||
|
|
||||||
if (stat(fileName, &result) == 0)
|
if (stat(fileName, &result) == 0)
|
||||||
{
|
{
|
||||||
time_t mod = result.st_mtime;
|
time_t mod = result.st_mtime;
|
||||||
return mod;
|
|
||||||
|
return (long)mod;
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -880,7 +880,7 @@ RLAPI bool ChangeDirectory(const char *dir); // Change work
|
||||||
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
|
RLAPI bool IsFileDropped(void); // Check if a file has been dropped into window
|
||||||
RLAPI char **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
|
RLAPI char **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
|
||||||
RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer (free memory)
|
RLAPI void ClearDroppedFiles(void); // Clear dropped files paths buffer (free memory)
|
||||||
RLAPI long GetLastWriteTime(const char *fileName); // Get last write time of a file
|
RLAPI long GetFileModTime(const char *fileName); // Get file modification time (last write time)
|
||||||
|
|
||||||
// Persistent storage management
|
// Persistent storage management
|
||||||
RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position)
|
RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue