Back to index

nordugrid-arc-nox  1.1.0~rc6
canonical_dir.h
Go to the documentation of this file.
00001 #ifndef __ARC_GM_CANONICAL_DIR__
00002 #define __ARC_GM_CANONICAL_DIR__
00003 #include <string>
00004 
00005 /*
00006   Removes /../ from 'name'. If leading_slash=true '/' will be added
00007   at the beginning of 'name' if missing. Otherwise it will be removed.
00008   Returns:
00009     0 - success
00010     1 - failure, if impossible to remove all /../
00011   todo: move to bool return type (??).
00012 */
00013 int canonical_dir(std::string &name,bool leading_slash = true);
00014 
00015 #endif
00016