home *** CD-ROM | disk | FTP | other *** search
/ MacHack 1998 / MacHack 1998.toast / Sessions / Completions / Completions Source / Files / FileCreator.cp < prev    next >
Encoding:
Text File  |  1998-06-15  |  421 b   |  27 lines  |  [TEXT/CWIE]

  1. // FileCreator.cp
  2.  
  3. #ifndef FileCreator_h
  4. #include "FileCreator.h"
  5. #endif
  6.  
  7. Task *FileCreator::operator()( const FSSpec& spec )
  8.   {
  9.     Assert( !Running() );
  10.  
  11.     fileParam.ioVRefNum = spec.vRefNum;
  12.     fileParam.ioNamePtr = const_cast<StringPtr>( spec.name );
  13.     fileParam.ioDirID = spec.parID;
  14.     
  15.     return this;
  16.   }
  17.  
  18. void FileCreator::Launch()
  19.   {
  20.     Assert( !Running() );
  21.     PBHCreateAsync( this );
  22.   }
  23.  
  24. void FileCreator::Kill()
  25.   {
  26.   }
  27.