appletfiles.c File Reference

#include <Finder.h>
#include <Script.h>
#include <StandardFile.h>
#include "appletfiles.h"
#include "appletcursor.h"
#include "appletops.h"
#include "appletmemory.h"
#include "appletstrings.h"
#include "appletbits.h"
#include "appletfilesinternal.h"
#include "appletsyserror.h"

Include dependency graph for appletfiles.c:

Go to the source code of this file.

Defines

#define sfgetfolderid   132
#define sfgetfolderbutton   11
#define sfgetpromptitem   10
#define sffilterUPP   ((FileFilterUPP) &sffilter)

Functions

void setfileerrorfile (ptrfilespec pfs)
boolean fileerror (ptrfilespec pfs, OSErr ec)
boolean filemakespec (short vnum, long dirid, bigstring fname, ptrfilespec pfs)
boolean fileexists (ptrfilespec pfs)
boolean equalfilespecs (ptrfilespec pfs1, ptrfilespec pfs2)
boolean isvolumefilespec (ptrfilespec pfs)
boolean getmacfileinfo (ptrfilespec pfs, CInfoPBRec *pb)
boolean setmacfileinfo (ptrfilespec pfs, CInfoPBRec *pb)
static boolean getinfofromvolpb (const HVolumeParam *pb, tyfileinfo *info)
boolean filegetvolumeinfo (tyvolnum vnum, tyfileinfo *info)
boolean filegetvolumename (short vnum, bigstring volname)
void filegetinfofrompb (CInfoPBRec *pb, tyfileinfo *info)
boolean filegetinfo (ptrfilespec pfs, tyfileinfo *info)
boolean filegetfilename (FSSpec *pfs, bigstring name)
boolean filesettype (ptrfilespec pfs, OSType type)
boolean filesetcreator (ptrfilespec pfs, OSType creator)
void fileclose (short fnum)
boolean fileseteof (short fnum, long eof)
boolean fileopen (ptrfilespec pfs, short *fnum)
boolean fileopenforreading (ptrfilespec pfs, short *fnum)
boolean fileopenresourcefork (ptrfilespec pfs, short *fnum)
boolean filedeletefile (ptrfilespec pfs)
boolean filenew (ptrfilespec pfs, OSType creator, OSType filetype, short *fnum)
boolean filetruncate (short fnum)
long filegetsize (short fnum)
boolean filewrite (short fnum, long ctwrite, void *buffer)
boolean fileread (short fnum, long ctread, void *buffer)
boolean filegetchar (short fnum, byte *buffer)
boolean filewritehandle (short fnum, Handle h)
boolean filereadhandle (short fnum, long ctbytes, Handle *hreturned)
boolean filereadwholefile (short fnum, Handle *hreturned)
static pascal Boolean sffilter (CInfoPBRec *pb)
boolean sfdialog (boolean flput, bigstring prompt, ptrfilespec pfs, sfcallback filterproc, OSType filetype)

Variables

boolean flerrordialogdisabled = false
static OSErr internalerrorcode = noErr
static sfcallback sfglobalfilter = nil


Define Documentation

#define sffilterUPP   ((FileFilterUPP) &sffilter)
 

Definition at line 771 of file appletfiles.c.

Referenced by sfdialog().

#define sfgetfolderbutton   11
 

Definition at line 27 of file appletfiles.c.

#define sfgetfolderid   132
 

Definition at line 26 of file appletfiles.c.

#define sfgetpromptitem   10
 

Definition at line 28 of file appletfiles.c.


Function Documentation

boolean equalfilespecs ptrfilespec  pfs1,
ptrfilespec  pfs2
 

Definition at line 78 of file appletfiles.c.

References equalstrings().

Here is the call graph for this function:

void fileclose short  fnum  ) 
 

Definition at line 483 of file appletfiles.c.

Referenced by closeappwindow(), copyonefile(), openappwindow(), openfilespec(), and saveaswindow().

boolean filedeletefile ptrfilespec  pfs  ) 
 

Definition at line 541 of file appletfiles.c.

References fileerror(), and setfileerrorfile().

Referenced by filenew().

Here is the call graph for this function:

boolean fileerror ptrfilespec  pfs,
OSErr  ec
 

Definition at line 44 of file appletfiles.c.

References flerrordialogdisabled, internalerrorcode, noErr, setfileerrorfile(), and syserror().

Referenced by copyfork(), copyonefile(), diskloop(), filedelete(), filedeletefile(), fileejectdisk(), filegetdiskicon(), filegetprefsspec(), filegettempfolder(), filegettempspec(), filemakealias(), filemove(), filenew(), fileopen(), fileopenforreading(), fileopenresourcefork(), fileread(), filerename(), filesetcreator(), filesetfinderflag(), filesetlocked(), filesettype(), filetruncate(), filewrite(), foldercopy(), folderloop(), getmacfileinfo(), getsystemfolderfilespec(), openforkforcopy(), and setmacfileinfo().

Here is the call graph for this function:

boolean fileexists ptrfilespec  pfs  ) 
 

Definition at line 70 of file appletfiles.c.

References noErr.

boolean filegetchar short  fnum,
byte buffer
 

Definition at line 647 of file appletfiles.c.

References fileread(), and noErr.

Here is the call graph for this function:

boolean filegetfilename FSSpec pfs,
bigstring  name
 

Definition at line 432 of file appletfiles.c.

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

Here is the call graph for this function:

boolean filegetinfo ptrfilespec  pfs,
tyfileinfo info
 

Definition at line 402 of file appletfiles.c.

References clearbytes(), filegetinfofrompb(), getmacfileinfo(), info, internalerrorcode, and longsizeof.

Here is the call graph for this function:

void filegetinfofrompb CInfoPBRec pb,
tyfileinfo info
 

Definition at line 316 of file appletfiles.c.

References clearbytes(), filegetvolumeinfo(), info, and longsizeof.

Here is the call graph for this function:

long filegetsize short  fnum  ) 
 

Definition at line 596 of file appletfiles.c.

References filesize(), and noErr.

Here is the call graph for this function:

boolean filegetvolumeinfo tyvolnum  vnum,
tyfileinfo info
 

Definition at line 237 of file appletfiles.c.

References bigstring, clearbytes(), getinfofromvolpb(), info, longsizeof, noErr, and setemptystring.

Here is the call graph for this function:

boolean filegetvolumename short  vnum,
bigstring  volname
 

Definition at line 290 of file appletfiles.c.

References clearbytes(), longsizeof, noErr, NULL, and setstringlength.

Here is the call graph for this function:

boolean filemakespec short  vnum,
long  dirid,
bigstring  fname,
ptrfilespec  pfs
 

Definition at line 60 of file appletfiles.c.

References noErr.

boolean filenew ptrfilespec  pfs,
OSType  creator,
OSType  filetype,
short fnum
 

Definition at line 557 of file appletfiles.c.

References filedeletefile(), fileerror(), noErr, and setfileerrorfile().

Referenced by copyonefile(), and saveappwindow().

Here is the call graph for this function:

boolean fileopen ptrfilespec  pfs,
short fnum
 

Definition at line 505 of file appletfiles.c.

References fileerror(), and setfileerrorfile().

Referenced by openappwindow(), and openfilespec().

Here is the call graph for this function:

boolean fileopenforreading ptrfilespec  pfs,
short fnum
 

Definition at line 517 of file appletfiles.c.

References fileerror(), and setfileerrorfile().

Here is the call graph for this function:

boolean fileopenresourcefork ptrfilespec  pfs,
short fnum
 

Definition at line 529 of file appletfiles.c.

References fileerror(), and setfileerrorfile().

Here is the call graph for this function:

boolean fileread short  fnum,
long  ctread,
void *  buffer
 

Definition at line 629 of file appletfiles.c.

References fileerror(), and nil.

Here is the call graph for this function:

boolean filereadhandle short  fnum,
long  ctbytes,
Handle hreturned
 

Definition at line 693 of file appletfiles.c.

References disposehandle(), filegetsize(), fileread(), filesize(), fl, h, lockhandle(), newclearhandle(), nil, and unlockhandle().

Here is the call graph for this function:

boolean filereadwholefile short  fnum,
Handle hreturned
 

Definition at line 728 of file appletfiles.c.

References filegetsize(), and filereadhandle().

Referenced by openappwindow(), and openfilespec().

Here is the call graph for this function:

boolean filesetcreator ptrfilespec  pfs,
OSType  creator
 

Definition at line 465 of file appletfiles.c.

References fileerror(), and info.

Here is the call graph for this function:

boolean fileseteof short  fnum,
long  eof
 

Definition at line 490 of file appletfiles.c.

References noErr.

boolean filesettype ptrfilespec  pfs,
OSType  type
 

Definition at line 447 of file appletfiles.c.

References fileerror(), and info.

Here is the call graph for this function:

boolean filetruncate short  fnum  ) 
 

Definition at line 590 of file appletfiles.c.

References fileerror(), and nil.

Here is the call graph for this function:

boolean filewrite short  fnum,
long  ctwrite,
void *  buffer
 

Definition at line 611 of file appletfiles.c.

References fileerror(), and nil.

Here is the call graph for this function:

boolean filewritehandle short  fnum,
Handle  h
 

Definition at line 674 of file appletfiles.c.

References filewrite(), fl, GetHandleSize, HLock, and HUnlock.

Here is the call graph for this function:

static boolean getinfofromvolpb const HVolumeParam *  pb,
tyfileinfo info
[static]
 

Definition at line 169 of file appletfiles.c.

References clearbytes(), info, and nil.

Referenced by filegetvolumeinfo().

Here is the call graph for this function:

boolean getmacfileinfo ptrfilespec  pfs,
CInfoPBRec pb
 

Definition at line 127 of file appletfiles.c.

References clearbytes(), fileerror(), and longsizeof.

Here is the call graph for this function:

boolean isvolumefilespec ptrfilespec  pfs  ) 
 

Definition at line 93 of file appletfiles.c.

References stringlength.

void setfileerrorfile ptrfilespec  pfs  ) 
 

Definition at line 31 of file appletfiles.c.

References bigstring, filegetfilename(), nil, setstringlength, and setsyserrorparam().

Referenced by copyonefile(), filedeletefile(), fileerror(), filenew(), fileopen(), fileopenforreading(), fileopenresourcefork(), and folderloop().

Here is the call graph for this function:

boolean setmacfileinfo ptrfilespec  pfs,
CInfoPBRec pb
 

Definition at line 149 of file appletfiles.c.

References fileerror().

Referenced by copyonefile(), filesetbundle(), filesetfolderview(), filesetlabel(), filesetvisible(), foldercopy(), setfiledates(), and setmodified().

Here is the call graph for this function:

boolean sfdialog boolean  flput,
bigstring  prompt,
ptrfilespec  pfs,
sfcallback  filterproc,
OSType  filetype
 

Definition at line 776 of file appletfiles.c.

References arrowcursor(), clearbytes(), cometofront(), copystring(), longsizeof, nil, pt, quickdrawglobal, r, sffilterUPP, and sfglobalfilter.

Here is the call graph for this function:

static pascal Boolean sffilter CInfoPBRec pb  )  [static]
 

Definition at line 742 of file appletfiles.c.

References filegetinfofrompb(), info, nil, and sfglobalfilter.

Here is the call graph for this function:


Variable Documentation

boolean flerrordialogdisabled = false
 

Definition at line 22 of file appletfiles.c.

Referenced by fileerror().

OSErr internalerrorcode = noErr [static]
 

Definition at line 24 of file appletfiles.c.

Referenced by fileerror(), and filegetinfo().

sfcallback sfglobalfilter = nil [static]
 

Definition at line 739 of file appletfiles.c.

Referenced by sfdialog(), and sffilter().


Generated on Wed May 31 20:48:41 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6