path.h

00001 /*
00002  * Copyright (C) 2013- The University of Notre Dame
00003  * This software is distributed under the GNU General Public License.
00004  * See the file COPYING for details.
00005  */
00006 
00007 #ifndef PATH_H
00008 #define PATH_H
00009 
00010 #include "buffer.h"
00011 
00012 void path_absolute (const char *src, char *dest, int exist);
00013 const char *path_basename (const char * path);
00014 const char *path_extension (const char *path);
00015 void path_collapse (const char *l, char *s, int remove_dotdot);
00016 void path_dirname (const char *path, char *dir);
00017 
00025 int path_lookup (char *search_path, const char *exe, char *dest, size_t destlen);
00026 
00030 char *path_getcwd (void);
00031 
00032 void path_remove_trailing_slashes (char *path);
00033 void path_split (const char *input, char *first, char *rest);
00034 void path_split_multi (const char *input, char *first, char *rest);
00035 
00036 int path_find (buffer_t *B, const char *dir, const char *pattern, int recursive);
00037 
00038 int path_within_dir( const char *path, const char *dir );
00039 
00040 
00041 /*
00042 Returns the first absolute path for executable exec as found in PATH.
00043 Returns NULL if none is found.
00044 */
00045 char *path_which(const char *exec);
00046 
00047 #endif

Generated on 7 Jul 2016 for cctools by  doxygen 1.6.1