pathfn.hpp 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef _RAR_PATHFN_
  2. #define _RAR_PATHFN_
  3. char* PointToName(const char *Path);
  4. wchar* PointToName(const wchar *Path);
  5. char* PointToLastChar(const char *Path);
  6. wchar* PointToLastChar(const wchar *Path);
  7. char* ConvertPath(const char *SrcPath,char *DestPath);
  8. wchar* ConvertPath(const wchar *SrcPath,wchar *DestPath);
  9. void SetExt(char *Name,const char *NewExt);
  10. void SetExt(wchar *Name,const wchar *NewExt);
  11. void SetSFXExt(char *SFXName);
  12. void SetSFXExt(wchar *SFXName);
  13. char *GetExt(const char *Name);
  14. wchar *GetExt(const wchar *Name);
  15. bool CmpExt(const char *Name,const char *Ext);
  16. bool CmpExt(const wchar *Name,const wchar *Ext);
  17. bool IsWildcard(const char *Str,const wchar *StrW=NULL);
  18. bool IsPathDiv(int Ch);
  19. bool IsDriveDiv(int Ch);
  20. int GetPathDisk(const char *Path);
  21. int GetPathDisk(const wchar *Path);
  22. void AddEndSlash(char *Path);
  23. void AddEndSlash(wchar *Path);
  24. void GetFilePath(const char *FullName,char *Path,int MaxLength);
  25. void GetFilePath(const wchar *FullName,wchar *Path,int MaxLength);
  26. void RemoveNameFromPath(char *Path);
  27. void RemoveNameFromPath(wchar *Path);
  28. void GetAppDataPath(char *Path);
  29. void GetAppDataPath(wchar *Path);
  30. void GetRarDataPath(char *Path);
  31. void GetRarDataPath(wchar *Path);
  32. bool EnumConfigPaths(wchar *Path,int Number);
  33. bool EnumConfigPaths(char *Path,int Number);
  34. void GetConfigName(const char *Name,char *FullName,bool CheckExist);
  35. void GetConfigName(const wchar *Name,wchar *FullName,bool CheckExist);
  36. char* GetVolNumPart(char *ArcName);
  37. wchar* GetVolNumPart(wchar *ArcName);
  38. void NextVolumeName(char *ArcName,wchar *ArcNameW,uint MaxLength,bool OldNumbering);
  39. bool IsNameUsable(const char *Name);
  40. bool IsNameUsable(const wchar *Name);
  41. void MakeNameUsable(char *Name,bool Extended);
  42. void MakeNameUsable(wchar *Name,bool Extended);
  43. char* UnixSlashToDos(char *SrcName,char *DestName=NULL,uint MaxLength=NM);
  44. char* DosSlashToUnix(char *SrcName,char *DestName=NULL,uint MaxLength=NM);
  45. wchar* UnixSlashToDos(wchar *SrcName,wchar *DestName=NULL,uint MaxLength=NM);
  46. wchar* DosSlashToUnix(wchar *SrcName,wchar *DestName=NULL,uint MaxLength=NM);
  47. void ConvertNameToFull(const char *Src,char *Dest);
  48. void ConvertNameToFull(const wchar *Src,wchar *Dest);
  49. bool IsFullPath(const char *Path);
  50. bool IsFullPath(const wchar *Path);
  51. bool IsDiskLetter(const char *Path);
  52. bool IsDiskLetter(const wchar *Path);
  53. void GetPathRoot(const char *Path,char *Root);
  54. void GetPathRoot(const wchar *Path,wchar *Root);
  55. int ParseVersionFileName(char *Name,wchar *NameW,bool Truncate);
  56. char* VolNameToFirstName(const char *VolName,char *FirstName,bool NewNumbering);
  57. wchar* VolNameToFirstName(const wchar *VolName,wchar *FirstName,bool NewNumbering);
  58. wchar* GetWideName(const char *Name,const wchar *NameW,wchar *DestW,size_t DestSize);
  59. char* GetAsciiName(const wchar *NameW,char *Name,size_t DestSize);
  60. #ifndef SFX_MODULE
  61. void GenerateArchiveName(char *ArcName,wchar *ArcNameW,size_t MaxSize,char *GenerateMask,bool Archiving);
  62. #endif
  63. #endif