Mac-Carbon
view release on metacpan or search on metacpan
MoreFiles/MoreFilesSrc/MoreFilesExtras.h view on Meta::CPAN
found this time.
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.
getFiles input: Pass true to have files added to the items list.
getDirectories input: Pass true to have directories added to the
items list.
items input: Pointer to array of FSSpec where the item list
is returned.
reqItemCount input: Maximum number of items to return (the number
of elements in the items array).
actItemCount output: The number of items actually returned.
itemIndex input: The current item index position. Set to 1 to
start with the first item in the directory.
output: The item index position to get the next item.
Pass this value the next time you call
GetDirItems to start where you left off.
Result Codes
noErr 0 No error, but there are more items
to list
nsvErr -35 No such volume
ioErr -36 I/O error
bdNamErr -37 Bad filename
fnfErr -43 File not found, there are no more items
to be listed.
paramErr -50 No default volume or itemIndex was <= 0
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 DeleteDirectoryContents(short vRefNum,
long dirID,
ConstStr255Param name);
/* ¦ Delete the contents of a directory.
The DeleteDirectoryContents function deletes the contents of a directory.
All files and subdirectories in the specified directory are deleted.
If a locked file or directory is encountered, it is unlocked and then
deleted. If any unexpected errors are encountered,
DeleteDirectoryContents quits and returns to the caller.
vRefNum input: Volume specification.
dirID input: Directory ID.
name input: Pointer to directory 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
wPrErr -44 Hardware volume lock
fLckdErr -45 File is locked
vLckdErr -46 Software volume lock
fBsyErr -47 File busy, directory not empty, or working directory control block open
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: DeleteDirectory
*/
/*****************************************************************************/
pascal OSErr DeleteDirectory(short vRefNum,
long dirID,
ConstStr255Param name);
/* ¦ Delete a directory and its contents.
The DeleteDirectory function deletes a directory and its contents.
All files and subdirectories in the specified directory are deleted.
If a locked file or directory is encountered, it is unlocked and then
deleted. After deleting the directories contents, the directory is
deleted. If any unexpected errors are encountered, DeleteDirectory
quits and returns to the caller.
vRefNum input: Volume specification.
dirID input: Directory ID.
name input: Pointer to directory 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
wPrErr -44 Hardware volume lock
fLckdErr -45 File is locked
vLckdErr -46 Software volume lock
fBsyErr -47 File busy, directory not empty, or working directory control block open
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: DeleteDirectoryContents
*/
/*****************************************************************************/
pascal OSErr CheckObjectLock(short vRefNum,
long dirID,
ConstStr255Param name);
/* ¦ Determine if a file or directory is locked.
The CheckObjectLock function determines if a file or directory is locked.
If CheckObjectLock returns noErr, then the file or directory
is not locked. If CheckObjectLock returns fLckdErr, the it is locked.
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
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: FSpCheckObjectLock
*/
/*****************************************************************************/
pascal OSErr FSpCheckObjectLock(const FSSpec *spec);
/* ¦ Determine if a file or directory is locked.
The FSpCheckObjectLock function determines if a file or directory is locked.
If FSpCheckObjectLock returns noErr, then the file or directory
is not locked.
spec input: An FSSpec record specifying 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
paramErr -50 No default volume
MoreFiles/MoreFilesSrc/MoreFilesExtras.h view on Meta::CPAN
pascal OSErr FSpCopyDirectoryAccess(const FSSpec *srcSpec,
const FSSpec *dstSpec);
/* ¦ Copy the AFP directory access privileges.
The FSpCopyDirectoryAccess function copies the AFP directory access
privileges from one directory to another. Both directories must be on
the same file server, but not necessarily on the same server volume.
srcSpec input: An FSSpec record specifying the source directory.
dstSpec input: An FSSpec record specifying the destination directory.
Result Codes
noErr 0 No error
nsvErr -35 Volume not found
fnfErr -43 Directory not found
vLckdErr -46 Volume is locked or read-only
paramErr -50 Volume doesn't support this function
afpAccessDenied -5000 User does not have the correct access
to the directory
afpObjectTypeErr -5025 Object is a file, not a directory
__________
See also: CopyDirectoryAccess
*/
/*****************************************************************************/
pascal OSErr HMoveRenameCompat(short vRefNum,
long srcDirID,
ConstStr255Param srcName,
long dstDirID,
ConstStr255Param dstpathName,
ConstStr255Param copyName);
/* ¦ Move a file or directory and optionally rename it.
The HMoveRenameCompat function moves a file or directory and optionally
renames it. The source and destination locations must be on the same
volume. This routine works even if the volume doesn't support MoveRename.
vRefNum input: Volume specification.
srcDirID input: Source directory ID.
srcName input: The source object name.
dstDirID input: Destination directory ID.
dstName input: Pointer to destination directory name, or
nil when dstDirID specifies a directory.
copyName input: Points to the new name if the object is to be
renamed or nil if the object isn't to be renamed.
Result Codes
noErr 0 No error
dirFulErr -33 File directory full
dskFulErr -34 Disk is full
nsvErr -35 Volume not found
ioErr -36 I/O error
bdNamErr -37 Bad filename or attempt to move into
a file
fnfErr -43 Source file or directory not found
wPrErr -44 Hardware volume lock
fLckdErr -45 File is locked
vLckdErr -46 Destination volume is read-only
fBsyErr -47 File busy, directory not empty, or
working directory control block open
dupFNErr -48 Destination already exists
paramErr -50 Volume doesn't support this function,
no default volume, or source and
volOfflinErr -53 Volume is offline
fsRnErr -59 Problem during rename
dirNFErr -120 Directory not found or incomplete pathname
badMovErr -122 Attempted to move directory into
offspring
wrgVolTypErr -123 Not an HFS volume (it's a MFS volume)
notAFileErr -1302 The pathname is nil, the pathname
is empty, or the pathname cannot refer
to a filename
diffVolErr -1303 Files on different volumes
afpAccessDenied -5000 The user does not have the right to
move the file or directory
afpObjectTypeErr -5025 Directory not found or incomplete pathname
afpSameObjectErr -5038 Source and destination files are the same
__________
See also: FSpMoveRenameCompat
*/
/*****************************************************************************/
pascal OSErr FSpMoveRenameCompat(const FSSpec *srcSpec,
const FSSpec *dstSpec,
ConstStr255Param copyName);
/* ¦ Move a file or directory and optionally rename it.
The FSpMoveRenameCompat function moves a file or directory and optionally
renames it. The source and destination locations must be on the same
volume. This routine works even if the volume doesn't support MoveRename.
srcSpec input: An FSSpec record specifying the source object.
dstSpec input: An FSSpec record specifying the destination
directory.
copyName input: Points to the new name if the object is to be
renamed or nil if the object isn't to be renamed.
Result Codes
noErr 0 No error
dirFulErr -33 File directory full
dskFulErr -34 Disk is full
nsvErr -35 Volume not found
ioErr -36 I/O error
bdNamErr -37 Bad filename or attempt to move into
a file
fnfErr -43 Source file or directory not found
wPrErr -44 Hardware volume lock
fLckdErr -45 File is locked
vLckdErr -46 Destination volume is read-only
fBsyErr -47 File busy, directory not empty, or
working directory control block open
dupFNErr -48 Destination already exists
paramErr -50 Volume doesn't support this function,
no default volume, or source and
volOfflinErr -53 Volume is offline
fsRnErr -59 Problem during rename
dirNFErr -120 Directory not found or incomplete pathname
badMovErr -122 Attempted to move directory into
offspring
wrgVolTypErr -123 Not an HFS volume (it's a MFS volume)
notAFileErr -1302 The pathname is nil, the pathname
is empty, or the pathname cannot refer
to a filename
diffVolErr -1303 Files on different volumes
afpAccessDenied -5000 The user does not have the right to
move the file or directory
afpObjectTypeErr -5025 Directory not found or incomplete pathname
afpSameObjectErr -5038 Source and destination files are the same
__________
See also: HMoveRenameCompat
*/
/*****************************************************************************/
pascal OSErr BuildAFPVolMountInfo(short flags,
char nbpInterval,
char nbpCount,
short uamType,
Str32 zoneName,
Str31 serverName,
Str27 volName,
Str31 userName,
Str8 userPassword,
Str8 volPassword,
AFPVolMountInfoPtr *afpInfoPtr);
/* ¦ Allocate and initializes the fields of an AFPVolMountInfo record.
The BuildAFPVolMountInfo function allocates and initializes the fields
of an AFPVolMountInfo record before using that record to call
the VolumeMount function.
flags input: The AFP mounting flags. 0 = normal mount;
set bit 0 to inhibit greeting messages.
nbpInterval input: The interval used for VolumeMount's
NBP Lookup call. 7 is a good choice.
nbpCount input: The retry count used for VolumeMount's
NBP Lookup call. 5 is a good choice.
uamType input: The user authentication method to use.
zoneName input: The AppleTalk zone name of the server.
serverName input: The AFP server name.
volName input: The AFP volume name.
userName input: The user name (zero length Pascal string for
guest).
userPassWord input: The user password (zero length Pascal string
if no user password)
volPassWord input: The volume password (zero length Pascal string
if no volume password)
afpInfoPtr output: A pointer to the newly created and initialized
AFPVolMountInfo record. If the function fails to
( run in 0.987 second using v1.01-cache-2.11-cpan-d8267643d1d )