diff options
| author | Ray <[email protected]> | 2022-01-28 00:23:28 +0100 |
|---|---|---|
| committer | Ray <[email protected]> | 2022-01-28 00:23:28 +0100 |
| commit | d38fe92c3f50fe14f051b4822ae9d24dd59067f5 (patch) | |
| tree | 0570010bb7925c9ae4aada9dfc981c0662272f76 /src | |
| parent | 0f00c41aad3a60f64481172bd11f8b4120963dc3 (diff) | |
| download | raylib-d38fe92c3f50fe14f051b4822ae9d24dd59067f5.tar.gz raylib-d38fe92c3f50fe14f051b4822ae9d24dd59067f5.zip | |
RENAMED: `GetFileSize()` to `GetFileLength()`
`GetFileSize()` conflicts with the infamous `windows.h`
Diffstat (limited to 'src')
| -rw-r--r-- | src/raylib.h | 2 | ||||
| -rw-r--r-- | src/rcore.c | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/raylib.h b/src/raylib.h index ab8892cc..6e6e2e2a 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1041,7 +1041,7 @@ RLAPI bool SaveFileText(const char *fileName, char *text); // Save text d RLAPI bool FileExists(const char *fileName); // Check if file exists RLAPI bool DirectoryExists(const char *dirPath); // Check if a directory path exists RLAPI bool IsFileExtension(const char *fileName, const char *ext); // Check file extension (including point: .png, .wav) -RLAPI int GetFileSize(const char *fileName); // Get file size in bytes +RLAPI int GetFileLength(const char *fileName); // Get file length in bytes (NOTE: GetFileSize() conflicts with windows.h) RLAPI const char *GetFileExtension(const char *fileName); // Get pointer to extension for a filename string (includes dot: '.png') RLAPI const char *GetFileName(const char *filePath); // Get pointer to filename for a path string RLAPI const char *GetFileNameWithoutExt(const char *filePath); // Get filename string without extension (uses static string) diff --git a/src/rcore.c b/src/rcore.c index 83b6a884..f0652d3b 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -2851,8 +2851,9 @@ bool DirectoryExists(const char *dirPath) return result; } -// Get file size in bytes -int GetFileSize(const char *fileName) +// Get file length in bytes +// NOTE: GetFileSize() conflicts with windows.h +int GetFileLength(const char *fileName) { int size = 0; |
