1370b324cSopenharmony_ci// ExtractingFilePath.h 2370b324cSopenharmony_ci 3370b324cSopenharmony_ci#ifndef ZIP7_INC_EXTRACTING_FILE_PATH_H 4370b324cSopenharmony_ci#define ZIP7_INC_EXTRACTING_FILE_PATH_H 5370b324cSopenharmony_ci 6370b324cSopenharmony_ci#include "../../../Common/MyString.h" 7370b324cSopenharmony_ci 8370b324cSopenharmony_ci// #ifdef _WIN32 9370b324cSopenharmony_civoid Correct_AltStream_Name(UString &s); 10370b324cSopenharmony_ci// #endif 11370b324cSopenharmony_ci 12370b324cSopenharmony_ci// replaces unsuported characters, and replaces "." , ".." and "" to "[]" 13370b324cSopenharmony_ciUString Get_Correct_FsFile_Name(const UString &name); 14370b324cSopenharmony_ci 15370b324cSopenharmony_ci/* 16370b324cSopenharmony_ci Correct_FsPath() corrects path parts to prepare it for File System operations. 17370b324cSopenharmony_ci It also corrects empty path parts like "\\\\": 18370b324cSopenharmony_ci - frontal empty path parts : it removes them or changes them to "_" 19370b324cSopenharmony_ci - another empty path parts : it removes them 20370b324cSopenharmony_ci if (absIsAllowed && path is absolute) : it removes empty path parts after start absolute path prefix marker 21370b324cSopenharmony_ci else 22370b324cSopenharmony_ci { 23370b324cSopenharmony_ci if (!keepAndReplaceEmptyPrefixes) : it removes empty path parts 24370b324cSopenharmony_ci if ( keepAndReplaceEmptyPrefixes) : it changes each empty frontal path part to "_" 25370b324cSopenharmony_ci } 26370b324cSopenharmony_ci*/ 27370b324cSopenharmony_civoid Correct_FsPath(bool absIsAllowed, bool keepAndReplaceEmptyPrefixes, UStringVector &parts, bool isDir); 28370b324cSopenharmony_ci 29370b324cSopenharmony_ciUString MakePathFromParts(const UStringVector &parts); 30370b324cSopenharmony_ci 31370b324cSopenharmony_ci#endif 32