Choco OS  V.0.16.9.0
Join to the chocolate world
oc_vfs.h
Go to the documentation of this file.
1 
28 #ifndef SYSTEM_USER_INC_OC_VFS_H_
29 #define SYSTEM_USER_INC_OC_VFS_H_
30 
31 #include <oc_fs.h>
32 #include <oc_devfs.h>
33 #include <oc_ramfs.h>
34 #include <oc_flashfs.h>
35 #include <oc_process.h>
36 
42 #define _________________________________________TYPES_SECTION______________________________________________________________________________
43 
46 
47 
48 #undef _________________________________________TYPES_SECTION______________________________________________________________________________
49 
56 #define _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
57 
60 extern oC_ErrorCode_t oC_VirtualFileSystem_TurnOn ( void );
61 extern oC_ErrorCode_t oC_VirtualFileSystem_TurnOff ( void );
62 extern oC_ErrorCode_t oC_VirtualFileSystem_AddFileSystem ( oC_FileSystem_t FileSystem );
63 extern oC_ErrorCode_t oC_VirtualFileSystem_RemoveFileSystem ( oC_FileSystem_t FileSystem );
64 extern oC_ErrorCode_t oC_VirtualFileSystem_mount ( const char * FileSystem , const char * Path );
65 extern oC_ErrorCode_t oC_VirtualFileSystem_umount ( const char * Path );
66 extern oC_ErrorCode_t oC_VirtualFileSystem_fopen ( oC_File_t * outFile , const char * Path , oC_FileSystem_ModeFlags_t Mode , oC_FileSystem_FileAttributes_t Attributes );
67 extern oC_ErrorCode_t oC_VirtualFileSystem_fclose ( oC_File_t File );
68 extern oC_ErrorCode_t oC_VirtualFileSystem_fcloseFromProcess ( oC_Process_t Process );
69 extern oC_ErrorCode_t oC_VirtualFileSystem_fread ( oC_File_t File , void * outBuffer , uint32_t * Size );
70 extern oC_ErrorCode_t oC_VirtualFileSystem_fwrite ( oC_File_t File , const void * Buffer , uint32_t * Size );
71 extern oC_ErrorCode_t oC_VirtualFileSystem_lseek ( oC_File_t File , uint32_t Offset );
72 extern oC_ErrorCode_t oC_VirtualFileSystem_ioctl ( oC_File_t File , oC_Ioctl_Command_t Command , void * Pointer);
73 extern oC_ErrorCode_t oC_VirtualFileSystem_sync ( oC_File_t File );
74 extern oC_ErrorCode_t oC_VirtualFileSystem_getc ( char * outCharacter , oC_File_t File );
75 extern oC_ErrorCode_t oC_VirtualFileSystem_putc ( char Character , oC_File_t File );
76 extern int32_t oC_VirtualFileSystem_tell ( oC_File_t File );
77 extern bool oC_VirtualFileSystem_eof ( oC_File_t File );
78 extern uint32_t oC_VirtualFileSystem_size ( oC_File_t File );
79 
80 extern oC_ErrorCode_t oC_VirtualFileSystem_opendir ( oC_Dir_t * outDir , const char * Path );
81 extern oC_ErrorCode_t oC_VirtualFileSystem_closedir ( oC_Dir_t Dir );
82 extern oC_ErrorCode_t oC_VirtualFileSystem_readdir ( oC_Dir_t Dir , oC_FileInfo_t * outFileInfo );
83 
84 extern oC_ErrorCode_t oC_VirtualFileSystem_stat ( const char * Path , oC_FileInfo_t * outFileInfo);
85 extern oC_ErrorCode_t oC_VirtualFileSystem_unlink ( const char * Path);
86 extern oC_ErrorCode_t oC_VirtualFileSystem_rename ( const char * OldName , const char * NewName);
87 extern oC_ErrorCode_t oC_VirtualFileSystem_chmod ( const char * Path, oC_FileSystem_FileAttributes_t Attributes , oC_FileSystem_FileAttributes_t Mask);
88 extern oC_ErrorCode_t oC_VirtualFileSystem_utime ( const char * Path , oC_Timestamp_t Timestamp );
89 extern oC_ErrorCode_t oC_VirtualFileSystem_mkdir ( const char * Path);
90 extern oC_ErrorCode_t oC_VirtualFileSystem_chdir ( const char * Path);
91 extern oC_ErrorCode_t oC_VirtualFileSystem_getcwd ( char * outBuffer , uint32_t Size );
92 
93 extern oC_ErrorCode_t oC_VirtualFileSystem_getpwd ( char * outPwd , uint32_t Size );
94 
95 extern oC_ErrorCode_t oC_VirtualFileSystem_ConvertRelativeToAbsolute( const char * Relative , char * outAbsolute , uint32_t * AbsoluteSize , bool TreatAsDir );
96 extern bool oC_VirtualFileSystem_DirExists ( const char * Path );
97 
98 #undef _________________________________________FUNCTIONS_SECTION__________________________________________________________________________
99 
101 #endif /* SYSTEM_USER_INC_OC_VFS_H_ */
Interface for the Flash File System.
oC_FileSystem_ModeFlags_t
Definition: oc_fs.h:54
The file with interface for file systems.
The file with source for the RAM file system.
The file with interface for process mechanism.
The file with interface for device drivers file system.
Definition: oc_devfs.c:60