ViewVC Help
View File | Revision Log | Show Annotations | Revision Graph | Root Listing
root/cebix/Frodo4/Src/file.h
Revision: 1.1
Committed: 2007-01-28T17:01:07Z (17 years, 9 months ago) by berlac
Content type: text/plain
Branch: MAIN
CVS Tags: HEAD
Log Message:
Initial revision.

File Contents

# Content
1 /*
2 *
3 * This file is taken from the ARAnyM project which builds a new and powerful
4 * TOS/FreeMiNT compatible virtual machine running on almost any hardware.
5 *
6 * This file is distributed under the GNU Public License, version 2 or at
7 * your option any later version. Read the file gpl.txt for details.
8 *
9 */
10
11 #ifndef HATARI_FILE_H
12 #define HATARI_FILE_H
13
14 #include "sysdeps.h"
15
16 #define MAX_FILENAME_LENGTH 260
17
18 /* File types */
19 enum {
20 FILEFILTER_DISCFILES,
21 FILEFILTER_ALLFILES,
22 FILEFILTER_TOSROM,
23 FILEFILTER_MAPFILE,
24 FILEFILTER_YMFILE,
25 FILEFILTER_MEMORYFILE,
26 };
27
28 #if defined(__BEOS__) || defined(OS_solaris) || defined(OS_mingw)
29 #include <dirent.h>
30 extern int alphasort(const void *d1, const void *d2);
31 extern int scandir(const char *dirname, struct dirent ***namelist, int(*select) (const struct dirent *), int (*dcomp) (const void *, const void *));
32 #endif /* __BEOS__ */
33
34 extern void File_CleanFileName(char *pszFileName);
35 extern void File_AddSlashToEndFileName(char *pszFileName);
36 extern bool File_DoesFileExtensionMatch(char *pszFileName, char *pszExtension);
37 extern bool File_IsRootFileName(char *pszFileName);
38 extern char *File_RemoveFileNameDrive(char *pszFileName);
39 extern bool File_DoesFileNameEndWithSlash(char *pszFileName);
40 extern void File_RemoveFileNameTrailingSlashes(char *pszFileName);
41 extern bool File_FileNameIsMSA(char *pszFileName);
42 extern bool File_FileNameIsST(char *pszFileName);
43 extern void *File_Read(char *pszFileName, void *pAddress, long *pFileSize, char *ppszExts[]);
44 extern bool File_Save(char *pszFileName, void *pAddress,long Size,bool bQueryOverwrite);
45 extern int File_Length(char *pszFileName);
46 extern bool File_Exists(const char *pszFileName);
47 extern bool File_Delete(char *pszFileName);
48 extern bool File_QueryOverwrite(char *pszFileName);
49 extern bool File_FindPossibleExtFileName(char *pszFileName,char *ppszExts[]);
50 extern void File_splitpath(char *pSrcFileName, char *pDir, char *pName, char *Ext);
51 extern void File_makepath(char *pDestFileName, char *pDir, char *pName, char *pExt);
52 extern void File_ShrinkName(char *pDestFileName, char *pSrcFileName, int maxlen);
53
54 #endif /* HATARI_FILE_H */