From 33c72f4c98190eb9864b56ecf1f4b73f418a24ad Mon Sep 17 00:00:00 2001 From: dockes Date: Mon, 20 Mar 2006 09:54:22 +0000 Subject: [PATCH] comments --- src/utils/pathut.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/utils/pathut.h b/src/utils/pathut.h index de082eaa..e749b2f0 100644 --- a/src/utils/pathut.h +++ b/src/utils/pathut.h @@ -16,20 +16,28 @@ */ #ifndef _PATHUT_H_INCLUDED_ #define _PATHUT_H_INCLUDED_ -/* @(#$Id: pathut.h,v 1.6 2006-01-30 11:15:28 dockes Exp $ (C) 2004 J.F.Dockes */ +/* @(#$Id: pathut.h,v 1.7 2006-03-20 09:54:22 dockes Exp $ (C) 2004 J.F.Dockes */ #include #include +/// Add a / at the end if none there yet. extern void path_catslash(std::string &s); +/// Concatenate 2 paths extern std::string path_cat(const std::string &s1, const std::string &s2); +/// Get the simple file name (get rid of any directory path prefix extern std::string path_getsimple(const std::string &s); +/// Simple file name + optional suffix stripping extern std::string path_basename(const std::string &s, const std::string &suff=""); +/// Get the father directory extern std::string path_getfather(const std::string &s); +/// Get the current user's home directory extern std::string path_home(); +/// Expand ~ at the beginning of string extern std::string path_tildexpand(const std::string &s); - +/// Clean up path by removing duplicated / and resolving ../ extern std::string path_canon(const std::string &s); +/// Use glob(3) to return a list of file names matching pattern inside dir extern std::list path_dirglob(const std::string &dir, const std::string pattern); #endif /* _PATHUT_H_INCLUDED_ */