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 FSIterateContainerGlobals FSIterateContainerGlobals
typedef 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

typedef struct FSDeleteContainerGlobals FSDeleteContainerGlobals

Definition at line 112 of file MoreFilesX.c.

typedef struct FSIterateContainerGlobals FSIterateContainerGlobals

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().

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

Definition at line 1161 of file MoreFilesX.c.

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

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().

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().

OSErr FSClearHasCustomIcon ( const FSRef *  ref  ) 

Definition at line 1304 of file MoreFilesX.c.

References FSChangeFinderFlags().

OSErr FSClearInvisible ( const FSRef *  ref  ) 

Definition at line 1256 of file MoreFilesX.c.

References FSChangeFinderFlags().

OSErr FSClearIsStationery ( const FSRef *  ref  ) 

Definition at line 1288 of file MoreFilesX.c.

References FSChangeFinderFlags().

OSErr FSClearNameLocked ( const FSRef *  ref  ) 

Definition at line 1272 of file MoreFilesX.c.

References FSChangeFinderFlags().

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.

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, FSDeleteContainerGlobals::result, and void.

OSErr FSDeleteContainerContents ( const FSRef *  container  ) 

Definition at line 1541 of file MoreFilesX.c.

References FSDeleteContainerLevel(), and FSDeleteContainerGlobals::result.

Referenced by FSDeleteContainer().

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

Definition at line 1477 of file MoreFilesX.c.

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

Referenced by FSDeleteContainerContents().

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.

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 
)

Definition at line 1737 of file MoreFilesX.c.

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

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, ref, 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().

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().

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 NULL, and FSDeleteContainerGlobals::result.

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

Definition at line 249 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

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

Definition at line 1676 of file MoreFilesX.c.

References FSIterateContainerGlobals::actualObjects, FSIterateContainerGlobals::containerChanged, FSIterateContainerGlobals::currentLevel, FSIterateContainerLevel(), FSIterateContainerGlobals::iterateFilter, FSIterateContainerGlobals::maxLevels, FSIterateContainerGlobals::name, FSIterateContainerGlobals::namePtr, NULL, FSIterateContainerGlobals::quitFlag, FSIterateContainerGlobals::ref, FSDeleteContainerGlobals::result, FSIterateContainerGlobals::result, FSIterateContainerGlobals::spec, FSIterateContainerGlobals::specPtr, FSIterateContainerGlobals::whichInfo, and FSIterateContainerGlobals::yourDataPtr.

static void FSIterateContainerLevel ( FSIterateContainerGlobals theGlobals  )  [static]

Definition at line 1610 of file MoreFilesX.c.

References FSIterateContainerGlobals::actualObjects, CallIterateContainerFilterProc, FSIterateContainerGlobals::catalogInfo, FSIterateContainerGlobals::containerChanged, FSIterateContainerGlobals::currentLevel, FSIterateContainerGlobals::iterateFilter, FSIterateContainerGlobals::maxLevels, FSIterateContainerGlobals::namePtr, FSIterateContainerGlobals::quitFlag, FSIterateContainerGlobals::ref, FSIterateContainerGlobals::result, FSIterateContainerGlobals::specPtr, FSIterateContainerGlobals::whichInfo, and FSIterateContainerGlobals::yourDataPtr.

Referenced by FSIterateContainer().

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

Definition at line 424 of file MoreFilesX.c.

References NULL, and FSDeleteContainerGlobals::result.

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

Definition at line 452 of file MoreFilesX.c.

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

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.

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.

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

Definition at line 483 of file MoreFilesX.c.

References NULL, ref, 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.

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.

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().

OSErr FSSetInvisible ( const FSRef *  ref  ) 

Definition at line 1249 of file MoreFilesX.c.

References FSChangeFinderFlags().

OSErr FSSetIsStationery ( const FSRef *  ref  ) 

Definition at line 1281 of file MoreFilesX.c.

References FSChangeFinderFlags().

OSErr FSSetNameLocked ( const FSRef *  ref  ) 

Definition at line 1265 of file MoreFilesX.c.

References FSChangeFinderFlags().

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().

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().


Generated on Thu Jul 1 06:10:55 2010 for Second Life Viewer by  doxygen 1.4.7