home *** CD-ROM | disk | FTP | other *** search
- /*
- File: VirtualDataForkOnlyFile.h
-
- Copyright: © 1991-1994 by Apple Computer, Inc.
- All rights reserved.
-
- Part of the AOCE Sample SMSAM Package. Consult the license
- which came with this software for your specific legal rights.
-
- */
-
-
-
- #ifndef __VIRTUALDATAFORKONLYFILE__
- #define __VIRTUALDATAFORKONLYFILE__
-
- #ifndef __VIRTUALMACFILE__
- #include "VirtualMacFile.h"
- #endif
-
- /***********************************|****************************************/
-
- class TVirtualDataForkOnlyFile : public TVirtualMacFile
- {
- public:
- TVirtualDataForkOnlyFile(const Str31 fileName, OSType creator = 'ttxt', OSType type = 'TEXT');
- TVirtualDataForkOnlyFile(const Str31 fileName, TVirtualFile* dataFile, OSType creator = 'ttxt', OSType type = 'TEXT' );
- virtual ~TVirtualDataForkOnlyFile();
-
- virtual OSErr Open ();
- virtual OSErr Close ();
-
- virtual OSErr ReadData (void* buffer, long& count, ForkType whichFork);
- virtual OSErr WriteData (const void* buffer, long& count, ForkType whichFork);
-
- virtual OSErr SetEnd (long logEof, ForkType whichFork);
- virtual OSErr GetEnd (long& logEof, ForkType whichFork) const;
-
- virtual OSErr SetPosition (short posMode, long posOff, ForkType whichFork);
- virtual OSErr GetPosition (long& filePos,ForkType whichFork) const;
-
- virtual OSErr SetFinderInfo (const FInfo& finderInfo);
- virtual OSErr GetFinderInfo (FInfo& finderInfo) const;
-
- virtual OSErr GetDate (unsigned long& dateTime,WhichDateType whichDate) const;
- virtual OSErr SetDate (unsigned long dateTime,WhichDateType whichDate);
-
- virtual void SetUserRef(long ref);
- virtual long GetUserRef() const;
-
- virtual OSErr GetSpec ( FSSpec& ) const;
- virtual OSErr SetSpec ( const FSSpec& );
-
- private: TVirtualDataForkOnlyFile ( const TVirtualDataForkOnlyFile& );
- TVirtualDataForkOnlyFile& operator = ( const TVirtualDataForkOnlyFile& );
-
- TVirtualFile* fDataFile;
- FInfo fFinderInfo;
-
- long fCreationDate;
- long fModificationDate;
-
- FSSpec fSpec;
- unsigned long fOpenCount;
- };
-
- /***********************************|****************************************/
-
- #endif // __VIRTUALDATAFORKONLYFILE__
-