MoreFilesX.c File Reference

#include <Carbon/Carbon.h>
#include <string.h>
#include "MoreFilesX.h"

Include dependency graph for MoreFilesX.c:

Go to the source code of this file.

Classes

struct  FSIterateContainerGlobals
struct  FSDeleteContainerGlobals

Defines

#define BuildingMoreFilesXForMacOS9   0

Typedefs

typedef struct
FSIterateContainerGlobals 
FSIterateContainerGlobals
typedef struct
FSDeleteContainerGlobals 
FSDeleteContainerGlobals

Functions

static void FSDeleteContainerLevel (const FSRef *container, FSDeleteContainerGlobals *theGlobals)
static void FSIterateContainerLevel (FSIterateContainerGlobals *theGlobals)
static OSErr GenerateUniqueHFSUniStr (long *startSeed, const FSRef *dir1, const FSRef *dir2, HFSUniStr255 *uniqueName)
OSErr FSCopyFork (SInt16 srcRefNum, SInt16 dstRefNum, void *copyBufferPtr, ByteCount copyBufferSize)
OSErr FSGetVolParms (FSVolumeRefNum volRefNum, UInt32 bufferSize, GetVolParmsInfoBuffer *volParmsInfo, UInt32 *actualInfoSize)
OSErr FSGetVRefNum (const FSRef *ref, FSVolumeRefNum *vRefNum)
OSErr FSGetVInfo (FSVolumeRefNum volume, HFSUniStr255 *volumeName, UInt64 *freeBytes, UInt64 *totalBytes)
OSErr FSGetVolFileSystemID (FSVolumeRefNum volume, UInt16 *fileSystemID, UInt16 *signature)
OSErr FSGetMountedVolumes (FSRef ***volumeRefsHandle, ItemCount *numVolumes)
OSErr FSRefMakeFSSpec (const FSRef *ref, FSSpec *spec)
OSErr FSMakeFSRef (FSVolumeRefNum volRefNum, SInt32 dirID, ConstStr255Param name, FSRef *ref)
OSStatus FSMakePath (SInt16 volRefNum, SInt32 dirID, ConstStr255Param name, UInt8 *path, UInt32 maxPathSize)
OSStatus FSPathMakeFSSpec (const UInt8 *path, FSSpec *spec, Boolean *isDirectory)
OSErr UnicodeNameGetHFSName (UniCharCount nameLength, const UniChar *name, TextEncoding textEncodingHint, Boolean isVolumeName, Str31 hfsName)
OSErr HFSNameGetUnicodeName (ConstStr31Param hfsName, TextEncoding textEncodingHint, HFSUniStr255 *unicodeName)
Boolean FSRefValid (const FSRef *ref)
OSErr FSGetParentRef (const FSRef *ref, FSRef *parentRef)
OSErr FSGetFileDirName (const FSRef *ref, HFSUniStr255 *outName)
OSErr FSGetNodeID (const FSRef *ref, long *nodeID, Boolean *isDirectory)
OSErr FSGetUserPrivilegesPermissions (const FSRef *ref, UInt8 *userPrivileges, UInt32 permissions[4])
OSErr FSCheckLock (const FSRef *ref)
OSErr FSGetForkSizes (const FSRef *ref, UInt64 *dataLogicalSize, UInt64 *rsrcLogicalSize)
OSErr FSGetTotalForkSizes (const FSRef *ref, UInt64 *totalLogicalSize, UInt64 *totalPhysicalSize, ItemCount *forkCount)
OSErr FSBumpDate (const FSRef *ref)
OSErr FSGetFinderInfo (const FSRef *ref, FinderInfo *info, ExtendedFinderInfo *extendedInfo, Boolean *isDirectory)
OSErr FSSetFinderInfo (const FSRef *ref, const FinderInfo *info, const ExtendedFinderInfo *extendedInfo)
OSErr FSChangeCreatorType (const FSRef *ref, OSType fileCreator, OSType fileType)
OSErr FSChangeFinderFlags (const FSRef *ref, Boolean setBits, UInt16 flagBits)
OSErr FSSetInvisible (const FSRef *ref)
OSErr FSClearInvisible (const FSRef *ref)
OSErr FSSetNameLocked (const FSRef *ref)
OSErr FSClearNameLocked (const FSRef *ref)
OSErr FSSetIsStationery (const FSRef *ref)
OSErr FSClearIsStationery (const FSRef *ref)
OSErr FSSetHasCustomIcon (const FSRef *ref)
OSErr FSClearHasCustomIcon (const FSRef *ref)
OSErr FSClearHasBeenInited (const FSRef *ref)
OSErr FSCopyFileMgrAttributes (const FSRef *sourceRef, const FSRef *destinationRef, Boolean copyLockBit)
OSErr FSMoveRenameObjectUnicode (const FSRef *ref, const FSRef *destDirectory, UniCharCount nameLength, const UniChar *name, TextEncoding textEncodingHint, FSRef *newRef)
OSErr FSDeleteContainerContents (const FSRef *container)
OSErr FSDeleteContainer (const FSRef *container)
OSErr FSIterateContainer (const FSRef *container, ItemCount maxLevels, FSCatalogInfoBitmap whichInfo, Boolean wantFSSpec, Boolean wantName, IterateContainerFilterProcPtr iterateFilter, void *yourDataPtr)
OSErr FSGetDirectoryItems (const FSRef *container, FSRef ***refsHandle, ItemCount *numRefs, Boolean *containerChanged)
OSErr FSExchangeObjectsCompat (const FSRef *sourceRef, const FSRef *destRef, FSRef *newSourceRef, FSRef *newDestRef)
OSErr MoreFiles_FSLockRange (SInt16 refNum, SInt32 rangeLength, SInt32 rangeStart)
OSErr MoreFiles_FSUnlockRange (SInt16 refNum, SInt32 rangeLength, SInt32 rangeStart)
OSErr FSGetDirAccess (const FSRef *ref, SInt32 *ownerID, SInt32 *groupID, SInt32 *accessRights)
OSErr FSSetDirAccess (const FSRef *ref, SInt32 ownerID, SInt32 groupID, SInt32 accessRights)
OSErr FSGetVolMountInfoSize (FSVolumeRefNum volRefNum, SInt16 *size)
OSErr FSGetVolMountInfo (FSVolumeRefNum volRefNum, void *volMountInfo)
OSErr FSVolumeMount (const void *volMountInfo, FSVolumeRefNum *volRefNum)
OSErr FSMapID (FSVolumeRefNum volRefNum, SInt32 ugID, SInt16 objType, Str31 name)
OSErr FSMapName (FSVolumeRefNum volRefNum, ConstStr255Param name, SInt16 objType, SInt32 *ugID)
OSErr FSCopyFile (const FSRef *srcFileRef, const FSRef *dstDirectoryRef, UniCharCount nameLength, const UniChar *copyName, TextEncoding textEncodingHint, FSRef *newRef)
OSErr FSMoveRename (const FSRef *srcFileRef, const FSRef *dstDirectoryRef, UniCharCount nameLength, const UniChar *moveName, TextEncoding textEncodingHint, FSRef *newRef)
OSErr FSResolveFileIDRef (FSVolumeRefNum volRefNum, SInt32 fileID, FSRef *ref)
OSErr FSCreateFileIDRef (const FSRef *ref, SInt32 *fileID)
Ptr GetTempBuffer (ByteCount buffReqSize, ByteCount *buffActSize)
OSErr FileRefNumGetFSRef (short refNum, FSRef *ref)
OSErr FSSetDefault (const FSRef *newDefault, FSRef *oldDefault)
OSErr FSRestoreDefault (const FSRef *oldDefault)


Define Documentation

#define BuildingMoreFilesXForMacOS9   0

Definition at line 79 of file MoreFilesX.c.


Typedef Documentation

Definition at line 112 of file MoreFilesX.c.

Definition at line 104 of file MoreFilesX.c.


Function Documentation

OSErr FileRefNumGetFSRef ( short  refNum,
FSRef *  ref 
)

Definition at line 2677 of file MoreFilesX.c.

References NULL.

OSErr FSBumpDate ( const FSRef *  ref  ) 

Definition at line 991 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

Referenced by FSChangeCreatorType(), and FSChangeFinderFlags().

Here is the caller graph for this function:

OSErr FSChangeCreatorType ( const FSRef *  ref,
OSType  fileCreator,
OSType  fileType 
)

Definition at line 1161 of file MoreFilesX.c.

References FSBumpDate(), NULL, and FSDeleteContainerGlobals::result.

Here is the call graph for this function:

OSErr FSChangeFinderFlags ( const FSRef *  ref,
Boolean  setBits,
UInt16  flagBits 
)

Definition at line 1207 of file MoreFilesX.c.

References FSBumpDate(), NULL, and FSDeleteContainerGlobals::result.

Referenced by FSClearHasBeenInited(), FSClearHasCustomIcon(), FSClearInvisible(), FSClearIsStationery(), FSClearNameLocked(), FSSetHasCustomIcon(), FSSetInvisible(), FSSetIsStationery(), and FSSetNameLocked().

Here is the call graph for this function:

Here is the caller graph for this function:

OSErr FSCheckLock ( const FSRef *  ref  ) 

Definition at line 821 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSClearHasBeenInited ( const FSRef *  ref  ) 

Definition at line 1313 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSClearHasCustomIcon ( const FSRef *  ref  ) 

Definition at line 1304 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSClearInvisible ( const FSRef *  ref  ) 

Definition at line 1256 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSClearIsStationery ( const FSRef *  ref  ) 

Definition at line 1288 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSClearNameLocked ( const FSRef *  ref  ) 

Definition at line 1272 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSCopyFile ( const FSRef *  srcFileRef,
const FSRef *  dstDirectoryRef,
UniCharCount  nameLength,
const UniChar *  copyName,
TextEncoding  textEncodingHint,
FSRef *  newRef 
)

Definition at line 2388 of file MoreFilesX.c.

References FSGetVolParms(), FSMakeFSRef(), NULL, UnicodeNameGetHFSName(), and VolHasCopyFile.

Here is the call graph for this function:

OSErr FSCopyFileMgrAttributes ( const FSRef *  sourceRef,
const FSRef *  destinationRef,
Boolean  copyLockBit 
)

Definition at line 1322 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSCopyFork ( SInt16  srcRefNum,
SInt16  dstRefNum,
void *  copyBufferPtr,
ByteCount  copyBufferSize 
)

Definition at line 144 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSCreateFileIDRef ( const FSRef *  ref,
SInt32 *  fileID 
)

Definition at line 2569 of file MoreFilesX.c.

References NULL.

OSErr FSDeleteContainer ( const FSRef *  container  ) 

Definition at line 1555 of file MoreFilesX.c.

References FSDeleteContainerContents(), NULL, and FSDeleteContainerGlobals::result.

Here is the call graph for this function:

OSErr FSDeleteContainerContents ( const FSRef *  container  ) 

Definition at line 1541 of file MoreFilesX.c.

References FSDeleteContainerLevel(), and FSDeleteContainerGlobals::result.

Referenced by FSDeleteContainer().

Here is the call graph for this function:

Here is the caller graph for this function:

static void FSDeleteContainerLevel ( const FSRef *  container,
FSDeleteContainerGlobals theGlobals 
) [static]

Definition at line 1477 of file MoreFilesX.c.

References FSDeleteContainerGlobals::actualObjects, FSDeleteContainerGlobals::catalogInfo, NULL, and FSDeleteContainerGlobals::result.

Referenced by FSDeleteContainerContents().

Here is the caller graph for this function:

OSErr FSExchangeObjectsCompat ( const FSRef *  sourceRef,
const FSRef *  destRef,
FSRef *  newSourceRef,
FSRef *  newDestRef 
)

Definition at line 1904 of file MoreFilesX.c.

References FSGetVolParms(), GenerateUniqueHFSUniStr(), NULL, FSDeleteContainerGlobals::result, and VolSupportsFSExchangeObjects.

Here is the call graph for this function:

OSErr FSGetDirAccess ( const FSRef *  ref,
SInt32 *  ownerID,
SInt32 *  groupID,
SInt32 *  accessRights 
)

Definition at line 2166 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetDirectoryItems ( const FSRef *  container,
FSRef ***  refsHandle,
ItemCount *  numRefs,
Boolean *  containerChanged 
)

OSErr FSGetFileDirName ( const FSRef *  ref,
HFSUniStr255 *  outName 
)

Definition at line 720 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetFinderInfo ( const FSRef *  ref,
FinderInfo info,
ExtendedFinderInfo extendedInfo,
Boolean *  isDirectory 
)

Definition at line 1067 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetForkSizes ( const FSRef *  ref,
UInt64 *  dataLogicalSize,
UInt64 *  rsrcLogicalSize 
)

Definition at line 864 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetMountedVolumes ( FSRef ***  volumeRefsHandle,
ItemCount *  numVolumes 
)

Definition at line 335 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetNodeID ( const FSRef *  ref,
long *  nodeID,
Boolean *  isDirectory 
)

Definition at line 741 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetParentRef ( const FSRef *  ref,
FSRef *  parentRef 
)

Definition at line 684 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

Referenced by updatethreadproc().

Here is the caller graph for this function:

OSErr FSGetTotalForkSizes ( const FSRef *  ref,
UInt64 *  totalLogicalSize,
UInt64 *  totalPhysicalSize,
ItemCount *  forkCount 
)

Definition at line 912 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetUserPrivilegesPermissions ( const FSRef *  ref,
UInt8 *  userPrivileges,
UInt32  permissions[4] 
)

Definition at line 781 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

Referenced by isDirWritable().

Here is the caller graph for this function:

OSErr FSGetVInfo ( FSVolumeRefNum  volume,
HFSUniStr255 *  volumeName,
UInt64 *  freeBytes,
UInt64 *  totalBytes 
)

Definition at line 275 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetVolFileSystemID ( FSVolumeRefNum  volume,
UInt16 *  fileSystemID,
UInt16 *  signature 
)

Definition at line 307 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSGetVolMountInfo ( FSVolumeRefNum  volRefNum,
void *  volMountInfo 
)

Definition at line 2277 of file MoreFilesX.c.

References NULL.

OSErr FSGetVolMountInfoSize ( FSVolumeRefNum  volRefNum,
SInt16 *  size 
)

Definition at line 2252 of file MoreFilesX.c.

References NULL.

OSErr FSGetVolParms ( FSVolumeRefNum  volRefNum,
UInt32  bufferSize,
GetVolParmsInfoBuffer *  volParmsInfo,
UInt32 *  actualInfoSize 
)

Definition at line 217 of file MoreFilesX.c.

References mycheck_noerr, NULL, and FSDeleteContainerGlobals::result.

Referenced by FSCopyFile(), FSCopyObjectPreflight(), FSExchangeObjectsCompat(), and FSMoveRename().

Here is the caller graph for this function:

OSErr FSGetVRefNum ( const FSRef *  ref,
FSVolumeRefNum *  vRefNum 
)

Definition at line 249 of file MoreFilesX.c.

References mycheck_noerr, NULL, and FSDeleteContainerGlobals::result.

Referenced by FSCopyObjectPreflight().

Here is the caller graph for this function:

OSErr FSIterateContainer ( const FSRef *  container,
ItemCount  maxLevels,
FSCatalogInfoBitmap  whichInfo,
Boolean  wantFSSpec,
Boolean  wantName,
IterateContainerFilterProcPtr  iterateFilter,
void *  yourDataPtr 
)

static void FSIterateContainerLevel ( FSIterateContainerGlobals theGlobals  )  [static]

OSErr FSMakeFSRef ( FSVolumeRefNum  volRefNum,
SInt32  dirID,
ConstStr255Param  name,
FSRef *  ref 
)

Definition at line 424 of file MoreFilesX.c.

References mycheck_noerr, NULL, and FSDeleteContainerGlobals::result.

Referenced by FSCopyFile(), FSMakePath(), FSMoveRename(), FSResolveFileIDRef(), FSSetDefault(), and FSUsePBHCopyFile().

Here is the caller graph for this function:

OSStatus FSMakePath ( SInt16  volRefNum,
SInt32  dirID,
ConstStr255Param  name,
UInt8 *  path,
UInt32  maxPathSize 
)

Definition at line 452 of file MoreFilesX.c.

References FSMakeFSRef(), NULL, and FSDeleteContainerGlobals::result.

Here is the call graph for this function:

OSErr FSMapID ( FSVolumeRefNum  volRefNum,
SInt32  ugID,
SInt16  objType,
Str31  name 
)

Definition at line 2328 of file MoreFilesX.c.

References NULL.

OSErr FSMapName ( FSVolumeRefNum  volRefNum,
ConstStr255Param  name,
SInt16  objType,
SInt32 *  ugID 
)

Definition at line 2357 of file MoreFilesX.c.

References NULL.

OSErr FSMoveRename ( const FSRef *  srcFileRef,
const FSRef *  dstDirectoryRef,
UniCharCount  nameLength,
const UniChar *  moveName,
TextEncoding  textEncodingHint,
FSRef *  newRef 
)

Definition at line 2458 of file MoreFilesX.c.

References FSGetVolParms(), FSMakeFSRef(), NULL, UnicodeNameGetHFSName(), and VolHasMoveRename.

Here is the call graph for this function:

OSErr FSMoveRenameObjectUnicode ( const FSRef *  ref,
const FSRef *  destDirectory,
UniCharCount  nameLength,
const UniChar *  name,
TextEncoding  textEncodingHint,
FSRef *  newRef 
)

Definition at line 1357 of file MoreFilesX.c.

References GenerateUniqueHFSUniStr(), NULL, and FSDeleteContainerGlobals::result.

Here is the call graph for this function:

OSStatus FSPathMakeFSSpec ( const UInt8 *  path,
FSSpec *  spec,
Boolean *  isDirectory 
)

Definition at line 483 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSRefMakeFSSpec ( const FSRef *  ref,
FSSpec *  spec 
)

Definition at line 403 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

Boolean FSRefValid ( const FSRef *  ref  ) 

Definition at line 676 of file MoreFilesX.c.

References NULL.

OSErr FSResolveFileIDRef ( FSVolumeRefNum  volRefNum,
SInt32  fileID,
FSRef *  ref 
)

Definition at line 2535 of file MoreFilesX.c.

References FSMakeFSRef(), and NULL.

Here is the call graph for this function:

OSErr FSRestoreDefault ( const FSRef *  oldDefault  ) 

Definition at line 2734 of file MoreFilesX.c.

References NULL.

OSErr FSSetDefault ( const FSRef *  newDefault,
FSRef *  oldDefault 
)

Definition at line 2687 of file MoreFilesX.c.

References FSMakeFSRef(), and NULL.

Here is the call graph for this function:

OSErr FSSetDirAccess ( const FSRef *  ref,
SInt32  ownerID,
SInt32  groupID,
SInt32  accessRights 
)

Definition at line 2210 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSSetFinderInfo ( const FSRef *  ref,
const FinderInfo info,
const ExtendedFinderInfo extendedInfo 
)

Definition at line 1126 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr FSSetHasCustomIcon ( const FSRef *  ref  ) 

Definition at line 1297 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSSetInvisible ( const FSRef *  ref  ) 

Definition at line 1249 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSSetIsStationery ( const FSRef *  ref  ) 

Definition at line 1281 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSSetNameLocked ( const FSRef *  ref  ) 

Definition at line 1265 of file MoreFilesX.c.

References FSChangeFinderFlags().

Here is the call graph for this function:

OSErr FSVolumeMount ( const void *  volMountInfo,
FSVolumeRefNum *  volRefNum 
)

Definition at line 2302 of file MoreFilesX.c.

References NULL.

static OSErr GenerateUniqueHFSUniStr ( long *  startSeed,
const FSRef *  dir1,
const FSRef *  dir2,
HFSUniStr255 *  uniqueName 
) [static]

Definition at line 1838 of file MoreFilesX.c.

References i, and FSDeleteContainerGlobals::result.

Referenced by FSExchangeObjectsCompat(), and FSMoveRenameObjectUnicode().

Here is the caller graph for this function:

Ptr GetTempBuffer ( ByteCount  buffReqSize,
ByteCount *  buffActSize 
)

Definition at line 2609 of file MoreFilesX.c.

References NULL.

OSErr HFSNameGetUnicodeName ( ConstStr31Param  hfsName,
TextEncoding  textEncodingHint,
HFSUniStr255 *  unicodeName 
)

Definition at line 594 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

OSErr MoreFiles_FSLockRange ( SInt16  refNum,
SInt32  rangeLength,
SInt32  rangeStart 
)

Definition at line 2120 of file MoreFilesX.c.

References FSDeleteContainerGlobals::result.

OSErr MoreFiles_FSUnlockRange ( SInt16  refNum,
SInt32  rangeLength,
SInt32  rangeStart 
)

Definition at line 2143 of file MoreFilesX.c.

References FSDeleteContainerGlobals::result.

OSErr UnicodeNameGetHFSName ( UniCharCount  nameLength,
const UniChar *  name,
TextEncoding  textEncodingHint,
Boolean  isVolumeName,
Str31  hfsName 
)

Definition at line 512 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

Referenced by FSCopyFile(), and FSMoveRename().

Here is the caller graph for this function:


Generated on Fri May 16 08:36:15 2008 for SecondLife by  doxygen 1.5.5