00001 /* 00002 * This file is part of the MLV Library. 00003 * 00004 * Copyright (C) 2010 Adrien Boussicault, Marc Zipstein 00005 * 00006 * 00007 * This Library is free software: you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation, either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * This Library is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this Library. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00032 #ifndef __MLV_PATH_H__ 00033 #define __MLV_PATH_H__ 00034 00035 #include <stdarg.h> 00036 00037 #ifdef __cplusplus 00038 extern "C" { 00039 #endif 00040 00048 char* MLV_get_base_name( const char* path ); 00049 00058 char* MLV_get_directory_name( const char* path ); 00059 00066 int MLV_path_is_absolute( const char* path ); 00067 00073 int MLV_path_is_relative( const char* path ); 00074 00084 int MLV_path_exists( const char* path ); 00085 00092 int MLV_path_is_a_directory( const char* path ); 00093 00100 int MLV_path_is_a_file( const char* path ); 00101 00117 char* MLV_build_path( const char* first_element, ... ); 00118 00125 char* MLV_build_path_v( char** elements ); 00126 00132 const char * MLV_get_current_directory( ); 00133 00143 const char * MLV_get_temporary_directory( ); 00144 00150 const char * MLV_get_home_directory( ); 00151 00152 #ifdef __cplusplus 00153 } 00154 #endif 00155 00156 #endif