|
|
1.1 root 1: /*
2: Hatari - file.h
3:
4: This file is distributed under the GNU Public License, version 2 or at
5: your option any later version. Read the file gpl.txt for details.
6: */
7:
1.1.1.4 ! root 8: #pragma once
! 9:
1.1 root 10: #ifndef HATARI_FILE_H
11: #define HATARI_FILE_H
12:
1.1.1.4 ! root 13: #ifdef __cplusplus
! 14: extern "C" {
! 15: #endif /* __cplusplus */
! 16:
1.1.1.3 root 17: void File_CleanFileName(char *pszFileName);
18: void File_AddSlashToEndFileName(char *pszFileName);
19: bool File_DoesFileExtensionMatch(const char *pszFileName, const char *pszExtension);
20: const char *File_RemoveFileNameDrive(const char *pszFileName);
21: bool File_DoesFileNameEndWithSlash(char *pszFileName);
22: Uint8 *File_Load(const char *pszFileName, long *pFileSize, const char * const ppszExts[]);
23: bool File_Save(const char *pszFileName, const Uint8 *pAddress, size_t Size, bool bQueryOverwrite);
24: off_t File_Length(const char *pszFileName);
25: bool File_Exists(const char *pszFileName);
26: bool File_DirExists(const char *psDirName);
27: bool File_QueryOverwrite(const char *pszFileName);
28: char* File_FindPossibleExtFileName(const char *pszFileName,const char * const ppszExts[]);
29: void File_SplitPath(const char *pSrcFileName, char *pDir, char *pName, char *Ext);
30: char* File_MakePath(const char *pDir, const char *pName, const char *pExt);
31: void File_ShrinkName(char *pDestFileName, const char *pSrcFileName, int maxlen);
32: FILE *File_Open(const char *path, const char *mode);
33: FILE *File_Close(FILE *fp);
34: bool File_Read(Uint8 *data, Uint32 size, Uint64 offset, FILE *fp);
35: bool File_Write(Uint8 *data, Uint32 size, Uint64 offset, FILE *fp);
36: bool File_InputAvailable(FILE *fp);
37: void File_MakeAbsoluteSpecialName(char *pszFileName);
38: void File_MakeAbsoluteName(char *pszFileName);
39: void File_MakeValidPathName(char *pPathName);
40: void File_PathShorten(char *path, int dirs);
41: void File_HandleDotDirs(char *path);
1.1 root 42:
1.1.1.4 ! root 43: #ifdef __cplusplus
! 44: }
! 45: #endif /* __cplusplus */
! 46:
1.1 root 47: #endif /* HATARI_FILE_H */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.