filefn.hpp 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #ifndef _RAR_FILEFN_
  2. #define _RAR_FILEFN_
  3. enum MKDIR_CODE {MKDIR_SUCCESS,MKDIR_ERROR,MKDIR_BADPATH};
  4. MKDIR_CODE MakeDir(const char *Name,const wchar *NameW,bool SetAttr,uint Attr);
  5. bool CreatePath(const char *Path,bool SkipLastName);
  6. bool CreatePath(const wchar *Path,bool SkipLastName);
  7. bool CreatePath(const char *Path,const wchar *PathW,bool SkipLastName);
  8. void SetDirTime(const char *Name,const wchar *NameW,RarTime *ftm,RarTime *ftc,RarTime *fta);
  9. bool IsRemovable(const char *Name);
  10. #ifndef SFX_MODULE
  11. int64 GetFreeDisk(const char *Name);
  12. #endif
  13. bool FileExist(const char *Name,const wchar *NameW=NULL);
  14. bool FileExist(const wchar *Name);
  15. bool WildFileExist(const char *Name,const wchar *NameW=NULL);
  16. bool IsDir(uint Attr);
  17. bool IsUnreadable(uint Attr);
  18. bool IsLabel(uint Attr);
  19. bool IsLink(uint Attr);
  20. void SetSFXMode(const char *FileName);
  21. void EraseDiskContents(const char *FileName);
  22. bool IsDeleteAllowed(uint FileAttr);
  23. void PrepareToDelete(const char *Name,const wchar *NameW=NULL);
  24. uint GetFileAttr(const char *Name,const wchar *NameW=NULL);
  25. bool SetFileAttr(const char *Name,const wchar *NameW,uint Attr);
  26. enum CALCCRC_SHOWMODE {CALCCRC_SHOWNONE,CALCCRC_SHOWTEXT,CALCCRC_SHOWALL};
  27. uint CalcFileCRC(File *SrcFile,int64 Size=INT64NDF,CALCCRC_SHOWMODE ShowMode=CALCCRC_SHOWNONE);
  28. bool RenameFile(const char *SrcName,const wchar *SrcNameW,const char *DestName,const wchar *DestNameW);
  29. bool DelFile(const char *Name);
  30. bool DelFile(const char *Name,const wchar *NameW);
  31. bool DelDir(const char *Name);
  32. bool DelDir(const char *Name,const wchar *NameW);
  33. #if defined(_WIN_ALL) && !defined(_WIN_CE)
  34. bool SetFileCompression(char *Name,wchar *NameW,bool State);
  35. #endif
  36. #endif