1
0

filefn.hpp 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. #ifndef _RAR_FILEFN_
  2. #define _RAR_FILEFN_
  3. enum MKDIR_CODE {MKDIR_SUCCESS,MKDIR_ERROR,MKDIR_BADPATH};
  4. MKDIR_CODE MakeDir(const wchar *Name,bool SetAttr,uint Attr);
  5. bool CreatePath(const wchar *Path,bool SkipLastName,bool Silent);
  6. void SetDirTime(const wchar *Name,RarTime *ftm,RarTime *ftc,RarTime *fta);
  7. bool IsRemovable(const wchar *Name);
  8. #ifndef SFX_MODULE
  9. int64 GetFreeDisk(const wchar *Name);
  10. #endif
  11. #if defined(_WIN_ALL) && !defined(SFX_MODULE) && !defined(SILENT)
  12. bool IsFAT(const wchar *Root);
  13. #endif
  14. bool FileExist(const wchar *Name);
  15. bool WildFileExist(const wchar *Name);
  16. bool IsDir(uint Attr);
  17. bool IsUnreadable(uint Attr);
  18. bool IsLink(uint Attr);
  19. void SetSFXMode(const wchar *FileName);
  20. void EraseDiskContents(const wchar *FileName);
  21. bool IsDeleteAllowed(uint FileAttr);
  22. void PrepareToDelete(const wchar *Name);
  23. uint GetFileAttr(const wchar *Name);
  24. bool SetFileAttr(const wchar *Name,uint Attr);
  25. #if 0
  26. wchar* MkTemp(wchar *Name,size_t MaxSize);
  27. #endif
  28. enum CALCFSUM_FLAGS {CALCFSUM_SHOWTEXT=1,CALCFSUM_SHOWPERCENT=2,CALCFSUM_SHOWPROGRESS=4,CALCFSUM_CURPOS=8};
  29. void CalcFileSum(File *SrcFile,uint *CRC32,byte *Blake2,uint Threads,int64 Size=INT64NDF,uint Flags=0);
  30. bool RenameFile(const wchar *SrcName,const wchar *DestName);
  31. bool DelFile(const wchar *Name);
  32. bool DelDir(const wchar *Name);
  33. #if defined(_WIN_ALL) && !defined(SFX_MODULE)
  34. bool SetFileCompression(const wchar *Name,bool State);
  35. void ResetFileCache(const wchar *Name);
  36. #endif
  37. #endif