pathname.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. Copyright (c) 1990-2001 Info-ZIP. All rights reserved.
  3. See the accompanying file LICENSE, version 2000-Apr-09 or later
  4. (the contents of which are also included in zip.h) for terms of use.
  5. If, for some reason, all these files are missing, the Info-ZIP license
  6. also may be found at: ftp://ftp.info-zip.org/pub/infozip/license.html
  7. */
  8. #ifndef PATHNAME_H
  9. #define PATHNAME_H 1
  10. char *StripPartialDir(char *CompletePath,
  11. const char *PartialPath, const char *FullPath);
  12. char *Real2RfDfFilen(char *RfDfFilen, const char *RealPath, short CurrentFork,
  13. short MacZipMode, Boolean DataForkOnly);
  14. char *RfDfFilen2Real(char *RealFn, const char *RfDfFilen, short MacZipMode,
  15. Boolean DataForkOnly, short *CurrentFork);
  16. unsigned short GetVolumeFromPath(const char *FullPath, char *VolumeName);
  17. char *GetCompletePath(char *CompletePath, const char *name, FSSpec *Spec,
  18. OSErr *err);
  19. char *TruncFilename(char *DirPath, const char *FilePath);
  20. char *GetFilename(char *CompletePath, const char *name);
  21. char *GetFullPathFromSpec(char *CompletePath, FSSpec *Spec, OSErr *err);
  22. char *GetFullPathFromID(char *CompletePath, short vRefNum, long dirID,
  23. ConstStr255Param name, OSErr *err);
  24. char *GetAppName(void);
  25. void createArchiveName(char *Path);
  26. void FindDesktopFolder(char *Path);
  27. char *FindNewExtractFolder(char *ExtractPath, Boolean uniqueFolder);
  28. OSErr FSpFindFolder(
  29. short vRefNum, /* Volume reference number. */
  30. OSType folderType, /* Folder type taken by FindFolder. */
  31. Boolean createFolder, /* Should we create it if non-existant. */
  32. FSSpec *spec); /* Pointer to resulting directory. */
  33. char *MakeFilenameShorter(const char *LongFilename);
  34. /*
  35. Rule: UnKnown_EF should always be zero.
  36. JohnnyLee_EF, NewZipMode_EF should always greater than all
  37. other definitions
  38. */
  39. #define UnKnown_EF 0
  40. #define TomBrownZipIt1_EF 10
  41. #define TomBrownZipIt2_EF 20
  42. #define JohnnyLee_EF 30
  43. #define NewZipMode_EF 40
  44. #define ResourceFork -1
  45. #define DataFork 1
  46. #define NoFork 0
  47. #ifndef NAME_MAX
  48. #define NAME_MAX 1024
  49. #endif
  50. #endif /* PATHNAME_H */