00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef __PFILESYSTEM_H
00021 #define __PFILESYSTEM_H
00022
00023
00024
00025 #include "ESR_ReturnCode.h"
00026 #include "PortPrefix.h"
00027 #include "PFile.h"
00028 #include "ptypes.h"
00029
00043
00047
00051
00052
00053 #define PSTDIN stdin
00054 #define PSTDOUT stdout
00055 #define PSTDERR stderr
00056
00059 typedef struct PFileSystem_t
00060 {
00067 ESR_ReturnCode(*destroy)(struct PFileSystem_t* self);
00068
00077 ESR_ReturnCode(*createPFile)(struct PFileSystem_t* self, const LCHAR* path, ESR_BOOL littleEndian, PFile** file);
00078
00087 ESR_ReturnCode(*mkdir)(struct PFileSystem_t* self, const LCHAR* path);
00088
00096 ESR_ReturnCode(*chdir)(struct PFileSystem_t* self, const LCHAR* path);
00097 }
00098 PFileSystem;
00099
00100
00106 PORTABLE_API ESR_ReturnCode PFileSystemCreate(void);
00107
00114 PORTABLE_API ESR_ReturnCode PFileSystemIsCreated(ESR_BOOL* isCreated);
00115
00121 PORTABLE_API ESR_ReturnCode PFileSystemDestroy(void);
00122
00131 PORTABLE_API ESR_ReturnCode PFileSystemCreatePFile(const LCHAR* path, ESR_BOOL littleEndian, PFile** file);
00132
00140 PORTABLE_API ESR_ReturnCode PFileSystemIsAbsolutePath(const LCHAR* path, ESR_BOOL* isAbsolute);
00141
00158 PORTABLE_API ESR_ReturnCode PFileSystemGetAbsolutePath(LCHAR* path, size_t* len);
00159
00166 PORTABLE_API ESR_ReturnCode PFileSystemCanonicalSlashes(LCHAR* path);
00167
00180 PORTABLE_API ESR_ReturnCode PFileSystemGetParentDirectory(LCHAR* path, size_t* len);
00181
00189 PORTABLE_API ESR_ReturnCode PFileSystemMkdir(const LCHAR* path);
00190
00199 PORTABLE_API ESR_ReturnCode PFileSystemGetcwd(LCHAR* path, size_t* len);
00200
00207 PORTABLE_API ESR_ReturnCode PFileSystemChdir(const LCHAR* path);
00208
00220 PORTABLE_API ESR_ReturnCode PFileSystemLinearToPathTokens(const LCHAR* path, LCHAR*** tokenArray, size_t* count);
00221
00225 #endif