⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 macstuff.h

📁 给出了 zip 压缩算法的完整实现过程。
💻 H
📖 第 1 页 / 共 4 页
字号:
pascal  OSErr   DTSetComment(short vRefNum,                             long dirID,                             ConstStr255Param name,                             ConstStr255Param comment);/*   Set a file or directory's Finder comment field.    The DTSetComment function sets a file or directory's Finder comment    field. The volume must support the Desktop Manager because you only    have read access to the Desktop file.    vRefNum input:  Volume specification.    dirID   input:  Directory ID.    name    input:  Pointer to object name, or nil when dirID                    specifies a directory that's the object.    comment input:  The comment to add. Comments are limited to 200 characters;                    longer comments are truncated.    Result Codes        noErr               0       No error        nsvErr              -35     Volume not found        ioErr               -36     I/O error        fnfErr              -43     File or directory doesnt exist        paramErr            -50     Volume doesn't support this function        wPrErr              -44     Volume is locked through hardware        vLckdErr            -46     Volume is locked through software        rfNumErr            -51     Reference number invalid        extFSErr            -58     External file system error - no file                                    system claimed this call.        desktopDamagedErr   -1305   The desktop database has become corrupted -                                    the Finder will fix this, but if your                                    application is not running with the                                    Finder, use PBDTReset or PBDTDelete    __________    Also see:   DTCopyComment, FSpDTCopyComment, FSpDTSetComment, DTGetComment,                FSpDTGetComment*//*****************************************************************************/pascal  OSErr   FSpDTSetComment(const FSSpec *spec,                                ConstStr255Param comment);/*   Set a file or directory's Finder comment field.    The FSpDTSetComment function sets a file or directory's Finder comment    field. The volume must support the Desktop Manager because you only    have read access to the Desktop file.    spec    input:  An FSSpec record specifying the file or directory.    comment input:  The comment to add. Comments are limited to 200 characters;                    longer comments are truncated.    Result Codes        noErr               0       No error        nsvErr              -35     Volume not found        ioErr               -36     I/O error        fnfErr              -43     File or directory doesnt exist        wPrErr              -44     Volume is locked through hardware        vLckdErr            -46     Volume is locked through software        rfNumErr            -51     Reference number invalid        paramErr            -50     Volume doesn't support this function        extFSErr            -58     External file system error - no file                                    system claimed this call.        desktopDamagedErr   -1305   The desktop database has become corrupted -                                    the Finder will fix this, but if your                                    application is not running with the                                    Finder, use PBDTReset or PBDTDelete    __________    Also see:   DTCopyComment, FSpDTCopyComment, DTSetComment, DTGetComment,                FSpDTGetComment*//*****************************************************************************/pascal  OSErr   XGetVInfo(short volReference,                          StringPtr volName,                          short *vRefNum,                          UnsignedWide *freeBytes,                          UnsignedWide *totalBytes);/*   Get extended information about a mounted volume.    The XGetVInfo function returns the name, volume reference number,    available space (in bytes), and total space (in bytes) for the    specified volume. You can specify the volume by providing its drive    number, volume reference number, or 0 for the default volume.    This routine is compatible with volumes up to 2 terabytes.    volReference    input:  The drive number, volume reference number,                            or 0 for the default volume.    volName         input:  A pointer to a buffer (minimum Str27) where                            the volume name is to be returned or must                            be nil.                    output: The volume name.    vRefNum         output: The volume reference number.    freeBytes       output: The number of free bytes on the volume.                            freeBytes is an UnsignedWide value.    totalBytes      output: The total number of bytes on the volume.                            totalBytes is an UnsignedWide value.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        paramErr            -50     No default volume    __________    Also see:   HGetVInfo*//*****************************************************************************/pascal  OSErr   HGetVInfo(short volReference,                          StringPtr volName,                          short *vRefNum,                          unsigned long *freeBytes,                          unsigned long *totalBytes);/*   Get information about a mounted volume.    The HGetVInfo function returns the name, volume reference number,    available space (in bytes), and total space (in bytes) for the    specified volume. You can specify the volume by providing its drive    number, volume reference number, or 0 for the default volume.    This routine is compatible with volumes up to 4 gigabytes.    volReference    input:  The drive number, volume reference number,                            or 0 for the default volume.    volName         input:  A pointer to a buffer (minimum Str27) where                            the volume name is to be returned or must                            be nil.                    output: The volume name.    vRefNum         output: The volume reference number.    freeBytes       output: The number of free bytes on the volume.                            freeBytes is an unsigned long value.    totalBytes      output: The total number of bytes on the volume.                            totalBytes is an unsigned long value.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        paramErr            -50     No default volume    __________    Also see:   XGetVInfo*//*****************************************************************************/pascal  OSErr   GetDirName(short vRefNum,                           long dirID,                           Str31 name);/*   Get the name of a directory from its directory ID.    The GetDirName function gets the name of a directory from its    directory ID.    vRefNum     input:  Volume specification.    dirID       input:  Directory ID.    name        output: Points to a Str31 where the directory name is to be                        returned.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        ioErr               -36     I/O error        bdNamErr            -37     Bad filename        fnfErr              -43     File not found        paramErr            -50     No default volume or                                    name parameter was NULL        dirNFErr            -120    Directory not found or incomplete pathname        afpAccessDenied     -5000   User does not have the correct access        afpObjectTypeErr    -5025   Directory not found or incomplete pathname*//*****************************************************************************/pascal  OSErr   GetVolFileSystemID(ConstStr255Param pathname,                                   short vRefNum,                                   short *fileSystemID);/*   Get a volume's file system ID.    The GetVolFileSystemID function returned the file system ID of    a mounted volume. The file system ID identifies the file system    that handles requests to a particular volume. Here's a partial list    of file system ID numbers (only Apple's file systems are listed):        FSID    File System        -----   -----------------------------------------------------        $0000   Macintosh HFS or MFS        $0100   ProDOS File System        $0101   PowerTalk Mail Enclosures        $4147   ISO 9660 File Access (through Foreign File Access)        $4242   High Sierra File Access (through Foreign File Access)        $464D   QuickTake File System (through Foreign File Access)        $4953   Macintosh PC Exchange (MS-DOS)        $4A48   Audio CD Access (through Foreign File Access)        $4D4B   Apple Photo Access (through Foreign File Access)    See the Technical Note "FL 35 - Determining Which File System    Is Active" and the "Guide to the File System Manager" for more    information.    pathName        input:  Pointer to a full pathname or nil.  If you pass                            in a partial pathname, it is ignored. A full                            pathname to a volume must contain at least                            one colon character (:) and must not start with                            a colon character.    vRefNum         input:  Volume specification (volume reference number,                            working directory number, drive number, or 0).    fileSystemID    output: The volume's file system ID.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        paramErr            -50     No default volume, or pb was NULL*//*****************************************************************************/pascal  OSErr GetDInfo(short vRefNum,                       long dirID,                       ConstStr255Param name,                       DInfo *fndrInfo);/*   Get the finder information for a directory.    The GetDInfo function gets the finder information for a directory.    vRefNum         input:  Volume specification.    dirID           input:  Directory ID.    name            input:  Pointer to object name, or nil when dirID                            specifies a directory that's the object.    fndrInfo        output: If the object is a directory, then its DInfo.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        ioErr               -36     I/O error        bdNamErr            -37     Bad filename        fnfErr              -43     File not found        paramErr            -50     No default volume        dirNFErr            -120    Directory not found or incomplete pathname        afpAccessDenied     -5000   User does not have the correct access        afpObjectTypeErr    -5025   Directory not found or incomplete pathname    __________    Also see:   FSpGetDInfo, FSpGetFInfoCompat*//*****************************************************************************/pascal  OSErr FSpGetDInfo(const FSSpec *spec,                          DInfo *fndrInfo);/*   Get the finder information for a directory.    The FSpGetDInfo function gets the finder information for a directory.    spec        input:  An FSSpec record specifying the directory.    fndrInfo    output: If the object is a directory, then its DInfo.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        ioErr               -36     I/O error        bdNamErr            -37     Bad filename        fnfErr              -43     File not found        paramErr            -50     No default volume        dirNFErr            -120    Directory not found or incomplete pathname        afpAccessDenied     -5000   User does not have the correct access        afpObjectTypeErr    -5025   Directory not found or incomplete pathname    __________    Also see:   FSpGetFInfoCompat, GetDInfo*/#endif    /*  _MACSTUFF_H  */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -