Movatterモバイル変換


[0]ホーム

URL:


Legacy Documentclose button

Important:The information in this document is obsolete and should not be used for new development.

PreviousBook ContentsBook IndexNext


PBHRename

You can use thePBHRename function to rename a file, directory, or volume.

FUNCTION PBHRename (paramBlock: HParmBlkPtr; async: Boolean):                      OSErr;
paramBlock
A pointer to a basic HFS parameter block.
async
A Boolean value that specifies asynchronous (TRUE) or synchronous (FALSE) execution.
-->ioCompletionProcPtrA pointer to a completion routine.
<--ioResultOSErrThe result code of the function.
-->ioNamePtrStringPtrA pointer to a pathname.
-->ioVRefNumIntegerA volume specification.
-->ioMiscPtrA pointer to the new name for the file.
-->ioDirIDLongIntA directory ID.

DESCRIPTION
Given a pointer to the name of a file or directory inioNamePtr,PBHRename changes it to the name pointed to byioMisc. Given a pointer to a volume name inioNamePtr or a volume reference number inioVRefNum, it changes the name of the volume to the name pointed to byioMisc.

Note
If a file ID reference exists for the file being renamed, the file ID remains with the file.
IMPORTANT
You cannot usePBHRename to change the directory in which a file
is located.
ASSEMBLY-LANGUAGE INFORMATION
The trap macro forPBHRename is_HRename.

RESULT CODES
noErr0No error
dirFulErr-33File directory full
dskFulErr-34Volume is full
nsvErr-35No such volume
ioErr-36I/O error
bdNamErr-37Bad filename
fnfErr-43File not found
wPrErr-44Hardware volume lock
fLckdErr-45File is locked
vLckdErr-46Software volume lock
dupFNErr-48Duplicate filename and version
paramErr-50No default volume
fsRnErr-59Problem during rename
dirNFErr-120Directory not found or incomplete pathname
afpAccessDenied-5000User does not have the correct access

PreviousBook ContentsBook IndexNext

Shop theApple Online Store (1-800-MY-APPLE), visit anApple Retail Store, or find areseller.

Copyright © 2016 Apple Inc. All rights reserved.


[8]ページ先頭

©2009-2025 Movatter.jp