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

📄 macstuff.h

📁 给出了 zip 压缩算法的完整实现过程。
💻 H
📖 第 1 页 / 共 4 页
字号:
        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*//*****************************************************************************/pascal  OSErr   DetermineVRefNum(ConstStr255Param pathname,                                 short vRefNum,                                 short *realVRefNum);/*   Determine the real volume reference number.    The DetermineVRefNum function determines the volume reference number of    a volume from a pathname, a volume specification, or a combination    of the two.    WARNING: Volume names on the Macintosh are *not* unique -- Multiple    mounted volumes can have the same name. For this reason, the use of a    volume name or full pathname to identify a specific volume may not    produce the results you expect.  If more than one volume has the same    name and a volume name or full pathname is used, the File Manager    currently uses the first volume it finds with a matching name in the    volume queue.    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 end with a colon character (:).    vRefNum     input:  Volume specification (volume reference number, working                        directory number, drive number, or 0).    realVRefNum output: The real volume reference number.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        paramErr            -50     No default volume*//*****************************************************************************/pascal  OSErr   FSpGetFullPath(const FSSpec *spec,                               short *fullPathLength,                               Handle *fullPath);/*   Get a full pathname to a volume, directory or file.    The GetFullPath function builds a full pathname to the specified    object. The full pathname is returned in the newly created handle    fullPath and the length of the full pathname is returned in    fullPathLength. Your program is responsible for disposing of the    fullPath handle.    spec            input:  An FSSpec record specifying the object.    fullPathLength  output: The number of characters in the full pathname.                            If the function fails to create a full pathname,                            it sets fullPathLength to 0.    fullPath        output: A handle to the newly created full pathname                            buffer. If the function fails to create a                            full pathname, it sets fullPath to NULL.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        ioErr               -36     I/O error        bdNamErr            -37     Bad filename        fnfErr              -43     File or directory does not exist        paramErr            -50     No default volume        memFullErr          -108    Not enough memory        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    __________    See also:   GetFullPath*//*****************************************************************************/pascal OSErr FSpLocationFromFullPath(short fullPathLength,                                     const void *fullPath,                                     FSSpec *spec);/*   Get a FSSpec from a full pathname.    The FSpLocationFromFullPath function returns a FSSpec to the object    specified by full pathname. This function requires the Alias Manager.    fullPathLength  input:  The number of characters in the full pathname                            of the target.    fullPath        input:  A pointer to a buffer that contains the full                            pathname of the target. The full pathname                            starts with the name of the volume, includes                            all of the directory names in the path to the                            target, and ends with the target name.    spec            output: An FSSpec record specifying the object.    Result Codes        noErr               0       No error        nsvErr              -35     The volume is not mounted        fnfErr              -43     Target not found, but volume and parent                                    directory found        paramErr            -50     Parameter error        usrCanceledErr      -128    The user canceled the operation    __________    See also:   LocationFromFullPath*//*****************************************************************************/pascal  OSErr   GetFullPath(short vRefNum,                            long dirID,                            ConstStr255Param name,                            short *fullPathLength,                            Handle *fullPath);/*   Get a full pathname to a volume, directory or file.    The GetFullPath function builds a full pathname to the specified    object. The full pathname is returned in the newly created handle    fullPath and the length of the full pathname is returned in    fullPathLength. Your program is responsible for disposing of the    fullPath handle.    Note that a full pathname can be made to a file/directory that does not    yet exist if all directories up to that file/directory exist. In this case,    GetFullPath will return a fnfErr.    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.    fullPathLength  output: The number of characters in the full pathname.                            If the function fails to create a full                            pathname, it sets fullPathLength to 0.    fullPath        output: A handle to the newly created full pathname                            buffer. If the function fails to create a                            full pathname, it sets fullPath to NULL.    Result Codes        noErr               0       No error        nsvErr              -35     No such volume        ioErr               -36     I/O error        bdNamErr            -37     Bad filename        fnfErr              -43     File or directory does not exist (fullPath                                    and fullPathLength are still valid)        paramErr            -50     No default volume        memFullErr          -108    Not enough memory        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    __________    See also:   FSpGetFullPath*//*****************************************************************************/pascal  OSErr   ChangeCreatorType(short vRefNum,                                  long dirID,                                  ConstStr255Param name,                                  OSType creator,                                  OSType fileType);/*   Change the creator or file type of a file.    The ChangeCreatorType function changes the creator or file type of a file.    vRefNum     input:  Volume specification.    dirID       input:  Directory ID.    name        input:  The name of the file.    creator     input:  The new creator type or 0x00000000 to leave                        the creator type alone.    fileType    input:  The new file type or 0x00000000 to leave the                        file type alone.    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        fLckdErr            -45     File is locked        vLckdErr            -46     Volume is locked or read-only        paramErr            -50     No default volume        dirNFErr            -120    Directory not found or incomplete pathname        notAFileErr         -1302   Name was not a file        afpAccessDenied     -5000   User does not have the correct access        afpObjectTypeErr    -5025   Directory not found or incomplete pathname    __________    See also:   FSpChangeCreatorType*//*****************************************************************************/pascal  OSErr   FSpChangeCreatorType(const FSSpec *spec,                                     OSType creator,                                     OSType fileType);/*   Change the creator or file type of a file.    The FSpChangeCreatorType function changes the creator or file type of a file.    spec        input:  An FSSpec record specifying the file.    creator     input:  The new creator type or 0x00000000 to leave                        the creator type alone.    fileType    input:  The new file type or 0x00000000 to leave the                        file type alone.    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        fLckdErr            -45     File is locked        vLckdErr            -46     Volume is locked or read-only        paramErr            -50     No default volume        dirNFErr            -120    Directory not found or incomplete pathname        notAFileErr         -1302   Name was not a file        afpAccessDenied     -5000   User does not have the correct access        afpObjectTypeErr    -5025   Directory not found or incomplete pathname    __________    See also:   ChangeCreatorType*//*****************************************************************************/pascal  OSErr   BumpDate(short vRefNum,                         long dirID,                         ConstStr255Param name);/*   Update the modification date of a file or directory.    The BumpDate function changes the modification date of a file or    directory to the current date/time.  If the modification date is already    equal to the current date/time, then add one second to the    modification date.    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.    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        fLckdErr            -45     File is locked        vLckdErr            -46     Volume is locked or read-only        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    __________    See also:   FSpBumpDate*//*****************************************************************************/pascal  OSErr   FSpBumpDate(const FSSpec *spec);/*   Update the modification date of a file or directory.    The FSpBumpDate function changes the modification date of a file or    directory to the current date/time.  If the modification date is already    equal to the current date/time, then add one second to the    modification date.    spec    input:  An FSSpec record specifying the object.    Result Codes

⌨️ 快捷键说明

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