home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Sample Code / AOCE Sample Code / PowerTalk Access Modules / Sample SMSAM / SampleSMSAM Source / VirtualFile / VirtualHFSFile.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-28  |  1.3 KB  |  56 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        VirtualHFSFile.h
  3.  
  4.     Copyright:    © 1991-1994 by Apple Computer, Inc.
  5.                 All rights reserved.
  6.  
  7.     Part of the AOCE Sample SMSAM Package.  Consult the license
  8.     which came with this software for your specific legal rights.
  9.  
  10. */
  11.  
  12.  
  13.  
  14. #ifndef __VIRTUALHFSFILE__
  15. #define __VIRTUALHFSFILE__
  16.  
  17. #ifndef __VIRTUALFILE__
  18. #include "VirtualFile.h"
  19. #endif
  20.  
  21. /***********************************|****************************************/
  22.  
  23. class TVirtualHFSFile : public TVirtualFile 
  24. {
  25. public:        TVirtualHFSFile ( const FSSpec& location);
  26.             TVirtualHFSFile ( short vRefNum, long dirID, const StringPtr name );
  27.     virtual ~TVirtualHFSFile ();
  28.  
  29.     virtual OSErr                     DeleteFile ();
  30.  
  31.     virtual OSErr                     ReadData (void* buffer, long& count);
  32.     virtual OSErr                     WriteData (const void* buffer, long& count);
  33.  
  34.     virtual OSErr                     SetEnd (long logEof);
  35.     virtual OSErr                     GetEnd (long& logEof) const;
  36.  
  37.     virtual OSErr                     SetPosition (short posMode, long posOff);
  38.     virtual OSErr                     GetPosition (long& filePos) const;
  39.  
  40.     virtual ostream&                 operator >> ( ostream& ) const;
  41.  
  42. private:    TVirtualHFSFile ( const TVirtualHFSFile& );
  43.             TVirtualHFSFile&        operator = ( const TVirtualHFSFile& );
  44.  
  45.     virtual    void                    Open ();
  46.     virtual    void                    Close ();
  47.  
  48.             FSSpec                    fSpec;
  49.             short                     fRefNum;
  50. };
  51.  
  52. /***********************************|****************************************/
  53.  
  54. #endif    // __VIRTUALHFSFILE__
  55.  
  56.