Browse Source

Renamed new PR function

RENAME: GetLastWriteTime() to GetFileModTime()
pull/663/head
raysan5 6 years ago
parent
commit
c7b601b624
2 changed files with 8 additions and 5 deletions
  1. +7
    -4
      src/core.c
  2. +1
    -1
      src/raylib.h

+ 7
- 4
src/core.c View File

@ -1682,15 +1682,18 @@ void ClearDroppedFiles(void)
#endif
}
// Get the last write time of a file
kt">long GetLastWriteTime(const char *fileName)
// Get file modification time (last write time)
n">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;
}

+ 1
- 1
src/raylib.h View File

@ -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 char **GetDroppedFiles(int *count); // Get dropped files names (memory should be freed)
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
RLAPI void StorageSaveValue(int position, int value); // Save integer value to storage file (to defined position)

Loading…
Cancel
Save