appletfiles.h

Go to the documentation of this file.
00001 
00002 /*  $Id: appletfiles.h 355 2005-01-11 22:48:55Z andreradke $    */
00003 
00004 /* copyright 1991-96 UserLand Software, Inc. All Rights Reserved.*/
00005 
00006 
00007 #ifndef filesinclude
00008 #define filesinclude
00009 
00010 
00011 #ifndef appletdefsinclude
00012 
00013     #include "appletdefs.h"
00014     
00015 #endif
00016 
00017 
00018 typedef char tyfoldername [32];
00019 
00020 typedef char tyfilename [32];
00021 
00022 
00023 typedef enum tyfolderview { 
00024     
00025     viewbysmallicon = 0,
00026     
00027     viewbyicon = 1,
00028     
00029     viewbyname = 2, 
00030     
00031     viewbydate = 3, 
00032     
00033     viewbysize = 4,
00034     
00035     viewbykind = 5, 
00036     
00037     viewbycomment = 6,
00038     
00039     viewbycolor = 7,
00040     
00041     viewbyversion = 8
00042     } tyfolderview;
00043 
00044 
00045 typedef struct tyfileinfo { /*flattens interface for getting file information*/
00046 
00047     OSErr errcode; /*if there was an error retrieving info about the file, this is the error number*/
00048     
00049     short vnum; /*the volume that the file is on*/
00050     
00051     long dirid; /*the folder that contains the file*/
00052     
00053     boolean flfolder: 1; /*true if it's a folder not a file*/
00054     
00055     boolean fllocked: 1; /*true if the file is locked*/
00056     
00057     boolean flbundle: 1; /*true if the file has a BNDL resource*/
00058     
00059     boolean flbusy: 1; /*true if the file is open in an application*/
00060     
00061     boolean flalias: 1; /*true if the file is an alias*/
00062     
00063     boolean flinvisible: 1; /*true if the file is invisible*/
00064     
00065     boolean flvolume: 1; /*true if it's a disk volume*/
00066     
00067     boolean flejectable: 1; /*true if it's an ejectable volume*/
00068     
00069     boolean flstationery: 1; /*true if the file is a stationery pad*/
00070     
00071     boolean flshared: 1; /*true if the file can the file be shared*/
00072     
00073     boolean flnamelocked: 1; /*true if the file's name is locked*/
00074     
00075     boolean flcustomicon: 1; /*true if the file has a custom icon*/
00076     
00077     boolean flhardwarelock: 1; /*for volumes, if true, the device is readonly*/
00078     
00079     boolean flremotevolume: 1; /*for volumes, if true, it's a remote volume, accessed over the network*/
00080     
00081     OSType filecreator, filetype; /*the creator ID and file type*/
00082     
00083     long timecreated, timemodified; /*the creation and modification date for the file*/
00084     
00085     long sizedatafork, sizeresourcefork; /*the size of the file's two forks*/
00086     
00087     short ixlabel; /*the file's label, as displayed in the Finder*/
00088     
00089     Point iconposition; /*the position of the file's icon, when viewing by icon in Finder*/
00090     
00091     unsigned short ctfiles; /*for folders, the number of files in the folder*/
00092     
00093     tyfolderview folderview; /*for folders, view by name, by date, etc.*/
00094     
00095     unsigned long ctfreebytes; /*for volumes*/
00096     
00097     unsigned long cttotalbytes; /*for volumes*/
00098     } tyfileinfo;
00099     
00100     
00101 #ifndef shelltypesinclude
00102     typedef FSSpec tyfilespec, *ptrfilespec;
00103 #endif
00104 
00105 typedef short tyvolnum;
00106 
00107 typedef boolean (*sfcallback) (tyfileinfo *);
00108 
00109 
00110 boolean fileexists (ptrfilespec);
00111 
00112 boolean filemakespec (short, long, bigstring, ptrfilespec);
00113 
00114 boolean filegetfilename (ptrfilespec, bigstring);
00115 
00116 boolean equalfilespecs (ptrfilespec, ptrfilespec);
00117 
00118 boolean sfdialog (boolean, bigstring, ptrfilespec, sfcallback, OSType);
00119 
00120 boolean fileopen (ptrfilespec, short *);
00121 
00122 boolean fileopenforreading (ptrfilespec, short *);
00123 
00124 boolean fileopenresourcefork (ptrfilespec, short *);
00125 
00126 boolean filereadwholefile (short, Handle *);
00127 
00128 boolean filedeletefile (ptrfilespec);
00129 
00130 boolean filenew (ptrfilespec, OSType, OSType, short *);
00131 
00132 boolean filegetinfo (ptrfilespec, tyfileinfo *);
00133 
00134 boolean filegetvolumeinfo (tyvolnum, tyfileinfo *);
00135 
00136 boolean filesettype (ptrfilespec, OSType);
00137 
00138 boolean filesetcreator (ptrfilespec, OSType);
00139 
00140 void fileclose (short);
00141 
00142 long filegetsize (short);
00143 
00144 boolean fileseteof (short, long);
00145 
00146 boolean filetruncate (short);
00147 
00148 boolean filewrite (short, long, void *);
00149 
00150 boolean fileread (short, long, void *);
00151 
00152 boolean filewritehandle (short, Handle);
00153 
00154 boolean filereadhandle (short, long, Handle *);
00155 
00156 boolean filegetchar (short, byte *);
00157 
00158 boolean filegetvolumename (short, bigstring);
00159 
00160 #endif

Generated on Wed May 31 18:19:41 2006 for frontierkernel 10.1.10a by  doxygen 1.4.6