file.c File Reference

#include "frontier.h"
#include "standard.h"
#include "filealias.h"
#include "cursor.h"
#include "dialogs.h"
#include "error.h"
#include "mac.h"
#include "memory.h"
#include "ops.h"
#include "quickdraw.h"
#include "resources.h"
#include "strings.h"
#include "frontierwindows.h"
#include "file.h"
#include "shell.h"
#include "shell.rsrc.h"
#include "langinternal.h"

Include dependency graph for file.c:

Go to the source code of this file.

Functions

boolean equalfilespecs (const tyfilespec *fs1, const tyfilespec *fs2)
boolean filesetposition (hdlfilenum fnum, long position)
boolean filegetposition (hdlfilenum fnum, long *position)
boolean filegeteof (hdlfilenum fnum, long *position)
boolean fileseteof (hdlfilenum fnum, long position)
long filegetsize (hdlfilenum fnum)
boolean filetruncate (hdlfilenum fnum)
boolean filewrite (hdlfilenum fnum, long ctwrite, void *buffer)
boolean filereaddata (hdlfilenum fnum, long ctread, long *ctactual, void *buffer)
boolean fileread (hdlfilenum fnum, long ctread, void *buffer)
boolean filegetchar (hdlfilenum fnum, char *ch)
boolean fileputchar (hdlfilenum fnum, char ch)
boolean filewritehandle (hdlfilenum fnum, Handle h)
boolean filereadhandle (hdlfilenum fnum, Handle *hreturned)
boolean flushvolumechanges (const tyfilespec *fs, hdlfilenum fnum)
void fileinit (void)
void fileshutdown (void)
static boolean filecreateandopen (const tyfilespec *fs, OSType creator, OSType filetype, hdlfilenum *fnum)
boolean fileopenorcreate (const tyfilespec *fs, OSType creator, OSType filetype, hdlfilenum *fnum)
boolean opennewfile (const tyfilespec *fs, OSType creator, OSType filetype, hdlfilenum *fnum)
boolean openfile (const tyfilespec *fs, hdlfilenum *fnum, boolean flreadonly)
boolean closefile (hdlfilenum fnum)
boolean deletefile (const tyfilespec *fs)
boolean fileexists (const tyfilespec *fs, boolean *flfolder)
boolean filegetfilename (const tyfilespec *pfs, bigstring name)


Function Documentation

boolean closefile hdlfilenum  fnum  ) 
 

Definition at line 715 of file file.c.

References FileRefNumGetFSRef(), FSClearNameLocked(), FSpClearNameLocked(), FSpGetFileLocation(), noErr, and oserror().

Referenced by ccsavespecialfile(), closewindowfile(), dbclosefile(), dbnewverb(), dbopenverb(), fifclosefile(), filecloser(), fwstransmitfile(), getgifheightwidthverb(), getjpegheightwidthverb(), shelldatabasesaveas(), shellnewfile(), shellnormalsaveas(), and shellopenfile().

Here is the call graph for this function:

boolean deletefile const tyfilespec fs  ) 
 

Definition at line 765 of file file.c.

References cleanendoffilename(), copystring(), error, fileisfolder(), FSClearNameLocked(), fsname, FSpClearNameLocked(), nullterminate, oserror(), and setfserrorparam().

Referenced by closewindowfile(), dbnewverb(), filecreateandopen(), filefunctionvalue(), opennewfile(), shelldatabasesaveas(), and shellnewfile().

Here is the call graph for this function:

boolean equalfilespecs const tyfilespec fs1,
const tyfilespec fs2
 

Definition at line 66 of file file.c.

References equalstrings(), and fsname.

Here is the call graph for this function:

static boolean filecreateandopen const tyfilespec fs,
OSType  creator,
OSType  filetype,
hdlfilenum *  fnum
[static]
 

Definition at line 511 of file file.c.

References deletefile(), fsname, FSSetNameLocked(), noErr, NULL, oserror(), and setfserrorparam().

Referenced by fileopenorcreate(), and opennewfile().

Here is the call graph for this function:

boolean fileexists const tyfilespec fs,
boolean flfolder
 

Definition at line 822 of file file.c.

References cleanendoffilename(), clearbytes(), copystring(), fileisvolume(), foldertest(), fsname, isemptystring, noErr, nullterminate, and stringlength.

Here is the call graph for this function:

boolean filegetchar hdlfilenum  fnum,
char *  ch
 

Definition at line 333 of file file.c.

References fileread().

Here is the call graph for this function:

boolean filegeteof hdlfilenum  fnum,
long position
 

Definition at line 135 of file file.c.

References filegetposition(), filesetposition(), NULL, and oserror().

Referenced by dbgeteof(), fifgetendoffile(), fifopenfile(), fifreadfile(), fifsetposition(), and fifwritehandle().

Here is the call graph for this function:

boolean filegetfilename const tyfilespec pfs,
bigstring  name
 

Definition at line 895 of file file.c.

References copystring(), filegetvolumename(), fsname, lastword(), and stringlength.

Here is the call graph for this function:

boolean filegetposition hdlfilenum  fnum,
long position
 

Definition at line 114 of file file.c.

References NULL, and oserror().

Referenced by backupfilepos(), fifgetposition(), filegeteof(), and fileopener().

Here is the call graph for this function:

long filegetsize hdlfilenum  fnum  ) 
 

Definition at line 203 of file file.c.

References GetFileSize(), noErr, and NULL.

Here is the call graph for this function:

void fileinit void   ) 
 

Definition at line 494 of file file.c.

References nil.

boolean fileopenorcreate const tyfilespec fs,
OSType  creator,
OSType  filetype,
hdlfilenum *  fnum
 

Definition at line 562 of file file.c.

References copystring(), filecreateandopen(), fsname, FSpSetNameLocked(), FSSetNameLocked(), noErr, NULL, and nullterminate.

Referenced by ccstart().

Here is the call graph for this function:

boolean fileputchar hdlfilenum  fnum,
char  ch
 

Definition at line 355 of file file.c.

References filewrite().

Here is the call graph for this function:

boolean fileread hdlfilenum  fnum,
long  ctread,
void *  buffer
 

Definition at line 305 of file file.c.

References filereaddata(), and oserror().

Here is the call graph for this function:

boolean filereaddata hdlfilenum  fnum,
long  ctread,
long ctactual,
void *  buffer
 

Definition at line 269 of file file.c.

References noErr, NULL, and oserror().

Referenced by fileread(), fwstransmitfile(), and loadbufferfromfile().

Here is the call graph for this function:

boolean filereadhandle hdlfilenum  fnum,
Handle hreturned
 

Definition at line 399 of file file.c.

References disposehandle(), filegetsize(), fileread(), h, and newclearhandle().

Here is the call graph for this function:

boolean fileseteof hdlfilenum  fnum,
long  position
 

Definition at line 166 of file file.c.

References error, NULL, and oserror().

Here is the call graph for this function:

boolean filesetposition hdlfilenum  fnum,
long  position
 

Definition at line 91 of file file.c.

References NULL, and oserror().

Referenced by backupfilepos(), ccsavespecialfile(), dbseek(), fifsetposition(), fifwritehandle(), filecloser(), filegeteof(), fwstransmitfile(), and opwinsavefile().

Here is the call graph for this function:

void fileshutdown void   ) 
 

Definition at line 502 of file file.c.

References nil.

boolean filetruncate hdlfilenum  fnum  ) 
 

Definition at line 230 of file file.c.

References fileseteof().

Here is the call graph for this function:

boolean filewrite hdlfilenum  fnum,
long  ctwrite,
void *  buffer
 

Definition at line 236 of file file.c.

References NULL, and oserror().

Here is the call graph for this function:

boolean filewritehandle hdlfilenum  fnum,
Handle  h
 

Definition at line 361 of file file.c.

References filewrite(), and gethandlesize().

Here is the call graph for this function:

boolean flushvolumechanges const tyfilespec fs,
hdlfilenum  fnum
 

Definition at line 464 of file file.c.

References NULL.

Referenced by closewindowfile(), dbflushheader(), shelldatabasesaveas(), shellnormalsaveas(), and shellsave().

boolean openfile const tyfilespec fs,
hdlfilenum *  fnum,
boolean  flreadonly
 

Definition at line 628 of file file.c.

References copystring(), fsname, FSpSetNameLocked(), FSSetNameLocked(), noErr, NULL, nullterminate, oserror(), and setfserrorparam().

Referenced by ccsavespecialfile(), dbopenverb(), fileopener(), fwstransmitfile(), getgifheightwidthverb(), getjpegheightwidthverb(), and shellopenfile().

Here is the call graph for this function:

boolean opennewfile const tyfilespec fs,
OSType  creator,
OSType  filetype,
hdlfilenum *  fnum
 

Definition at line 614 of file file.c.

References deletefile(), filecreateandopen(), and fileexists().

Referenced by dbnewverb(), shelldatabasesaveas(), shellnewfile(), and shellnormalsaveas().

Here is the call graph for this function:


Generated on Thu Jun 1 07:03:30 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6