PFileSystem.h

00001 /*---------------------------------------------------------------------------*
00002  *  PFileSystem.h  *
00003  *                                                                           *
00004  *  Copyright 2007 Nuance Communciations, Inc.                               *
00005  *                                                                           *
00006  *  Licensed under the Apache License, Version 2.0 (the 'License');          *
00007  *  you may not use this file except in compliance with the License.         *
00008  *                                                                           *
00009  *  You may obtain a copy of the License at                                  *
00010  *      http://www.apache.org/licenses/LICENSE-2.0                           *
00011  *                                                                           *
00012  *  Unless required by applicable law or agreed to in writing, software      *
00013  *  distributed under the License is distributed on an 'AS IS' BASIS,        *
00014  *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * 
00015  *  See the License for the specific language governing permissions and      *
00016  *  limitations under the License.                                           *
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 /*PORTABLE_API PFile* PSTDIN;*/
00047 /*PORTABLE_API PFile* PSTDOUT;*/
00051 /*PORTABLE_API PFile* PSTDERR;*/
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 /* __PFILESYSTEM_H */

Generated on Thu May 1 15:37:25 2008 for SREC by  doxygen 1.5.3