vlc_fs.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * vlc_fs.h: File system helpers
00003  *****************************************************************************
00004  * Copyright © 2006-2010 Rémi Denis-Courmont
00005  *
00006  * This program is free software; you can redistribute it and/or modify
00007  * it under the terms of the GNU General Public License as published by
00008  * the Free Software Foundation; either version 2 of the License, or
00009  * (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
00019  *****************************************************************************/
00020 
00021 #ifndef VLC_FS_H
00022 #define VLC_FS_H 1
00023 
00024 /**
00025  * \file
00026  * Those functions convert file paths from UTF-8 to the system-specific
00027  * encoding (especially UTF-16 on Windows). Also, they always mark file
00028  * descriptor with the close-on-exec flag.
00029  */
00030 
00031 #include <sys/types.h>
00032 #include <dirent.h>
00033 
00034 VLC_EXPORT( int, vlc_open, ( const char *filename, int flags, ... ) LIBVLC_USED );
00035 VLC_EXPORT( FILE *, vlc_fopen, ( const char *filename, const char *mode ) LIBVLC_USED );
00036 VLC_EXPORT( int, vlc_openat, ( int fd, const char *filename, int flags, ... ) LIBVLC_USED );
00037 
00038 VLC_EXPORT( DIR *, vlc_opendir, ( const char *dirname ) LIBVLC_USED );
00039 VLC_EXPORT( char *, vlc_readdir, ( DIR *dir ) LIBVLC_USED );
00040 VLC_EXPORT( int, vlc_loaddir, ( DIR *dir, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
00041 VLC_EXPORT( int, vlc_scandir, ( const char *dirname, char ***namelist, int (*select)( const char * ), int (*compar)( const char **, const char ** ) ) );
00042 VLC_EXPORT( int, vlc_mkdir, ( const char *filename, mode_t mode ) );
00043 
00044 VLC_EXPORT( int, vlc_unlink, ( const char *filename ) );
00045 VLC_EXPORT( int, vlc_rename, ( const char *oldpath, const char *newpath ) );
00046 
00047 #if defined( WIN32 ) && !defined( UNDER_CE )
00048 # define stat _stati64
00049 #endif
00050 
00051 VLC_EXPORT( int, vlc_stat, ( const char *filename, struct stat *buf ) );
00052 VLC_EXPORT( int, vlc_lstat, ( const char *filename, struct stat *buf ) );
00053 
00054 VLC_EXPORT( int, vlc_mkstemp, ( char * ) );
00055 
00056 VLC_EXPORT( int, vlc_dup, ( int ) );
00057 #endif

Generated on Mon Nov 22 07:55:19 2010 for VLC by  doxygen 1.5.6