Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #ifndef VLC_FS_H
00022 #define VLC_FS_H 1
00023
00024
00025
00026
00027
00028
00029
00030
00031 #include <sys/types.h>
00032 #include <dirent.h>
00033
00034 VLC_API int vlc_open( const char *filename, int flags, ... ) VLC_USED;
00035 VLC_API FILE * vlc_fopen( const char *filename, const char *mode ) VLC_USED;
00036 VLC_API int vlc_openat( int fd, const char *filename, int flags, ... ) VLC_USED;
00037
00038 VLC_API DIR * vlc_opendir( const char *dirname ) VLC_USED;
00039 VLC_API char * vlc_readdir( DIR *dir ) VLC_USED;
00040 VLC_API int vlc_loaddir( DIR *dir, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) );
00041 VLC_API int vlc_scandir( const char *dirname, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) );
00042 VLC_API int vlc_mkdir( const char *filename, mode_t mode );
00043
00044 VLC_API int vlc_unlink( const char *filename );
00045 VLC_API int vlc_rename( const char *oldpath, const char *newpath );
00046 VLC_API char *vlc_getcwd( void ) VLC_USED;
00047
00048 #if defined( WIN32 )
00049 static inline int vlc_closedir( DIR *dir )
00050 {
00051 _WDIR *wdir = *(_WDIR **)dir;
00052 free( dir );
00053 return wdir ? _wclosedir( wdir ) : 0;
00054 }
00055 # undef closedir
00056 # define closedir vlc_closedir
00057
00058 static inline void vlc_rewinddir( DIR *dir )
00059 {
00060 _WDIR *wdir = *(_WDIR **)dir;
00061
00062 _wrewinddir( wdir );
00063 }
00064 # undef rewinddir
00065 # define rewinddir vlc_rewinddir
00066
00067 # include <sys/stat.h>
00068 # ifndef UNDER_CE
00069 # ifndef stat
00070 # define stat _stati64
00071 # endif
00072 # ifndef fstat
00073 # define fstat _fstati64
00074 # endif
00075 # endif
00076 #endif
00077
00078 struct stat;
00079
00080 VLC_API int vlc_stat( const char *filename, struct stat *buf );
00081 VLC_API int vlc_lstat( const char *filename, struct stat *buf );
00082
00083 VLC_API int vlc_mkstemp( char * );
00084
00085 VLC_API int vlc_dup( int );
00086 VLC_API int vlc_pipe( int[2] );
00087 #endif