home *** CD-ROM | disk | FTP | other *** search
/ MacHack 2000 / MacHack 2000.toast / pc / The Hacks / Genie / Projects / Pedestal / Source / Includes / PedFSRef.hh < prev    next >
Encoding:
Text File  |  2000-06-24  |  1.7 KB  |  60 lines

  1. /*    ===========
  2.  *    PedFSRef.hh
  3.  *    ===========
  4.  *    
  5.  *    Implemented by PedFSRef.cc
  6.  */
  7.  
  8. #pragma once
  9.  
  10. #include <Types.h>
  11. #include <Files.h>
  12.  
  13. #include "PedObject.hh"
  14.  
  15. typedef short AccessPath;
  16.  
  17. class PedFSRef : public PedObject {
  18. public:
  19.     PedFSRef();
  20.     PedFSRef(const FSSpec &inFSS);
  21.     PedFSRef(short inVRefNum, long inDir, const char *inName);
  22.     PedFSRef(short inVRefNum, long inDir, const unsigned char *inName);
  23.     PedFSRef(const char *inPathname);
  24.     PedFSRef(const unsigned char *inPathname);
  25.     virtual ~PedFSRef();
  26.     
  27.     virtual const FSSpec &FSS() const;
  28.     virtual void SetFSSpec(const FSSpec &inFSS);
  29.     virtual void SetVolDefault(short inVRefNum);
  30.     virtual void SetVolRoot(short inVRefNum);
  31.     virtual void SetVolDir(short inVRefNum, long inDir);
  32.     virtual void SetVolDirName(short inVRefNum, long inDir, const char *inName);
  33.     virtual void SetVolDirName(short inVRefNum, long inDir, const unsigned char *inName);
  34.     virtual void SetPathname(const char *inPathname);
  35.     virtual void SetPathname(const unsigned char *inPathname);
  36.     
  37.     virtual bool Exists();
  38.     virtual bool IsFile();
  39.     virtual bool IsDirectory();
  40.     
  41.     virtual void CreateFile(OSType inCreator, OSType inType);
  42.     virtual void CreateDirectory();
  43.     
  44.     virtual AccessPath OpenData(SInt8 inPerm) const;
  45.     virtual AccessPath OpenRF(SInt8 inPerm) const;
  46.     virtual AccessPath OpenResFile(SInt8 inPerm) const;
  47.     
  48.     virtual PedFSRef &operator-(short inLevels);
  49.     virtual PedFSRef &operator-=(short inLevels);
  50.     virtual PedFSRef &operator--();
  51.     
  52.     virtual PedFSRef &operator+(const char *inName);
  53.     virtual PedFSRef &operator+(const unsigned char *inName);
  54.     virtual PedFSRef &operator+=(const char *inName);
  55.     virtual PedFSRef &operator+=(const unsigned char *inName);
  56.     
  57. protected:
  58.     FSSpec mFSS;
  59. };
  60.