Chris Nandor > Mac-Carbon > Files/Files.xs

Download:
Mac-Carbon-0.82.tar.gz

Annotate this POD

CPAN RT

New  4
Open  6
Stalled  1
View/Report Bugs
Source  

Types

FInfo

Information for a file, including:

    OSType     fdType            the type of the file
    OSType     fdCreator         file's creator
    U16        fdFlags           flags ex. hasbundle,invisible,locked, etc.
    Point      fdLocation        file's location in folder
FXInfo

Further information for a file, including:

    short      fdIconID          Icon ID
    I8         fdScript          Script flag and number
    I8         fdXFlags          More flag bits
    short      fdComment         Comment ID
    long       fdPutAway         Home Dir ID
DInfo

Information for a directory, including:

    Rect       frRect            folder rect
    U16        frFlags           Flags
    Point      frLocation        folder location
    short      frView            folder view
DXInfo

Further information for a directory, including:

    Point      frScroll          scroll position
    long       frOpenChain       DirID chain of open folders
    I8         frScript          Script flag and number
    I8         frXFlags          More flag bits
    short      frComment         comment
    long       frPutAway         DirID
CatInfo

Catalog information of a file or a directory, including:

    Str255     ioNamePtr         ptr to Vol:FileName string
    short      ioVRefNum         volume refnum (DrvNum for Eject and MountVol)
    short      ioFRefNum         reference number
    I8         ioFVersNum        version number
    short      ioFDirIndex       GetFInfo directory index
    I8         ioFlAttrib        GetFInfo: in-use bit=7, lock bit=0
    I8         ioACUser          access rights for directory only
    FInfo      ioFlFndrInfo      user info
    long       ioDirID           A directory ID
    U16        ioFlStBlk         start file block (0 if none)
    long       ioFlLgLen         logical length (EOF)
    long       ioFlPyLen         physical length
    U16        ioFlRStBlk        start block rsrc fork
    long       ioFlRLgLen        file logical length rsrc fork
    long       ioFlRPyLen        file physical length rsrc fork
    time_t     ioFlCrDat         file creation date& time
    time_t     ioFlMdDat         last modified date and time
    time_t     ioFlBkDat         
    FXInfo     ioFlXFndrInfo     
    long       ioFlParID         
    long       ioFlClpSiz        
    DInfo      ioDrUsrWds        
    long       ioDrDirID         
    U16        ioDrNmFls         
    time_t     ioDrCrDat         
    time_t     ioDrMdDat         
    time_t     ioDrBkDat         
    DXInfo     ioDrFndrInfo      
    long       ioDrParID         

Functions

FSpGetCatInfo FILE [, INDEX ]

If INDEX is omitted or 0, returns information about the specified file or folder. If INDEX is nonzero, returns information obout the nth item in the specified folder.

FSpSetCatInfo FILE, INFO

Change information about the specified file.

FSMakeFSSpec VREF, DIRID, NAME

Creates a file system specification record from a volume number, directory ID, and name. This call never returns a path name.

FSpCreate FILE, CREATOR, TYPE [, SCRIPTTAG]

Creates a file with the specified file creator and type. You don't want to know what a script tag is.

FSpDirCreate FILE [, SCRIPTTAG]

Creates a directory and returns its ID.

FSpDelete FILE

End the sad existence of a file or (empty) folder.

FSpGetFInfo FILE

Returns finder info about a specified file.

FSpSetFInfo FILE, INFO

Changes the finder info about a specified file.

FSpSetFLock FILE

Software lock a file.

FSpRstFLock FILE

Unlock a file.

FSpRename FILE, NAME

Rename a file (only the name component).

FSpCatMove FILE, FOLDER

Move a file into a different folder.

FSpExchangeFiles FILE1, FILE2

Swap the contents of two files, e.g. if you saved to a temp file and finally swap it with the original.

NewAlias FILE

Returns an AliasHandle for the file.

NewAliasRelative FROM, FILE

Returns a AliasHandle relative to FROM for the file.

NewAliasMinimal FILE

Returns an AliasHandle containing minimal information for the file. This type of alias is best suited for short lived aliases, e.g. in AppleEvents.

NewAliasMinimalFromFullPath NAME [, ZONE [, SERVER]]

Create a new alias containing only the path name.

UpdateAlias TARGET, ALIAS

Updates an alias to point to the target file. Returns whether the alias was changed..

UpdateAliasRelative FROM, TARGET, ALIAS

Updates an alias to point to the target file relative to FROM. Returns whether the alias was changed..

ResolveAlias ALIAS

Resolves an alias. In scalar context, returns the path to the resolved file. In list context, also returns whether the alias was changed when resolving.

ResolveAliasRelative FROM, ALIAS

Resolves an alias relative to a file. In scalar context, returns the path to the resolved file. In list context, also returns whether the alias was changed when resolving.

GetAliasInfo ALIAS, INDEX

Return a component of the alias information.

UnmountVol (VOLUMENAME | VOLUMENR)

Unmounts a volume.

Eject (VOLUMENAME | VOLUMENR)

Mac OS only.

Ejects a volume, placing it offline.

FlushVol (VOLUMENAME | VOLUMENR)

Flush pending write operations on a volume.

FindFolder VREF, FOLDERTYPE [, CREATE]

Returns a path to a special folder on the given volume (specify kOnSystemDisk for the boot volume). For FOLDERTYPE, you can specify any of the kXXXFolderType constants listed above.

syntax highlighting: