1 // ExtractingFilePath.h 2 3 #ifndef __EXTRACTING_FILE_PATH_H 4 #define __EXTRACTING_FILE_PATH_H 5 6 #include "../../../Common/MyString.h" 7 8 #ifdef _WIN32 9 void Correct_AltStream_Name(UString &s); 10 #endif 11 12 // replaces unsuported characters, and replaces "." , ".." and "" to "[]" 13 UString Get_Correct_FsFile_Name(const UString &name); 14 15 /* 16 Correct_FsPath() corrects path parts to prepare it for File System operations. 17 It also corrects empty path parts like "\\\\": 18 - frontal empty path parts : it removes them or changes them to "_" 19 - another empty path parts : it removes them 20 if (absIsAllowed && path is absolute) : it removes empty path parts after start absolute path prefix marker 21 else 22 { 23 if (!keepAndReplaceEmptyPrefixes) : it removes empty path parts 24 if ( keepAndReplaceEmptyPrefixes) : it changes each empty frontal path part to "_" 25 } 26 */ 27 void Correct_FsPath(bool absIsAllowed, bool keepAndReplaceEmptyPrefixes, UStringVector &parts, bool isDir); 28 29 UString MakePathFromParts(const UStringVector &parts); 30 31 #endif 32