File Manager Result Codes

The most common result codes returned by File Manager are listed below.

noErr 0

No error

notOpenErr -28

Volume not found

dirFulErr -33

File directory full

dskFulErr -34

Disk or volume full

nsvErr -35

Volume not found

ioErr -36

I/O error.

bdNamErr -37

Bad filename or volume name

fnOpnErr -38

File not open.

eofErr -39

Logical end-of-file reached.

posErr -40

Attempt to position mark before the start of the file.

tmfoErr -42

Too many files open

fnfErr -43

File or directory not found; incomplete pathname

wPrErr -44

Volume is locked through hardware

fLckdErr -45

File is locked.

vLckdErr -46

Volume is locked through software

fBsyErr -47

One or more files are open

File is busy

Directory is not empty.

dupFNErr -48

Duplicate filename and version

Destination file already exists

File found instead of folder

opWrErr -49

File already open for writing

paramErr -50

Invalid value passed in a parameter. Your application passed an invalid parameter for dialog options.

rfNumErr -51

Invalid reference number

gfpErr -52

Error during GetFPos, PBGetFPosSync or PBGetFPosAsync

volOffLinErr -53

Volume is offline

permErr -54

Attempt to open locked file for writing

Permissions error

volOnLinErr -55

Volume already online

nsDrvErr -56

No such drive

noMacDskErr -57

Not a Macintosh disk

extFSErr -58

Volume belongs to an external file system

fsRnErr -59

Problem during rename

badMDBErr -60

Bad master directory block

wrPermErr -61

Read/ write permission doesn’t allow writing.

memFullErr -108

Not enough memory

Not enough room in heap zone.

Not enough memory to speak

dirNFErr -120

Directory not found or incomplete pathname

tmwdoErr -121

Too many working directories open

badMovErr -122

Attempt to move

wrgVolTypErr -123

Volume does not support Desktop Manager

Not an HFS volume

volGoneErr -124

Server volume has been disconnected

fidNotFound -1300

File ID not found

fidExists -1301

File ID already exists

notAFileErr -1302

Specified file is a directory

diffVolErr -1303

Files on different volumes

catChangedErr -1304

Catalog has changed and catalog position record may be invalid

sameFileErr -1306
errFSBadFSRef -1401

An FSRef parameter was invalid. There are several possible causes:

  • The parameter was not optional, but the pointer was NULL.
  • The volume reference number contained within the FSRef does not match a currently mounted volume. This can happen if the volume was unmounted after the FSRef was created.
  • Some other private field inside the FSRef contains a value that could never be valid. If the field value could be valid, but doesn’t happen to match the existing volume or in-memory structures, a “not found” error would be returned instead.

errFSBadForkName -1402

A supplied fork name was invalid (i.e., was syntactically illegal for the given volume). For example, the fork name might contain characters that cannot be stored on the given volume (such as a colon on HFS volumes).

Some volume formats do not store fork names in Unicode. These volume formats will attempt to convert the Unicode name to the kind of encoding used by the volume format. If the name could not be converted, errFSBadForkName is returned.

Some volume formats only support a limited set of forks, such as the data and resource forks on HFS volumes. For those volumes, if any other fork name is passed, this error is returned.

errFSBadBuffer -1403

A non-optional buffer pointer was NULL, or its size was invalid for the type of data it was expected to contain. In a protected memory system, this could also mean the buffer space is not part of the address space for the calling process.

errFSBadForkRef -1404

A file reference number does not correspond to a fork opened with the FSOpenFork, PBOpenForkSync, or PBOpenForkAsync functions. This could be because that fork has already been closed. Or, you may have passed a referece number created with older APIs (e.g., by the PBHOpenDF functions). A value of zero is never a valid file reference number.

errFSBadInfoBitmap -1405

A FSCatalogInfoBitmap or FSVolumeInfoBitmap has one or more reserved or undefined bits set. This error code can also be returned if a defined bit is set, but the corresponding FSCatalogInfo or FSVolumeInfo field cannot be operated on with that call (for example, trying to use FSSetCatalogInfo to set the valence of a directory).

errFSMissingCatInfo -1406

A FSCatalogInfo pointer is NULL, but is not optional. Or, the FSCatalogInfo is optional and NULL, but the corresponding FSCatalogInfoBitmap is not zero (that is,the bitmap says that one or more of the FSCatalogInfo fields is being passed, but the supplied pointer was NULL).

errFSNotAFolder -1407

A parameter was expected to identify a folder, but it identified some other kind of object (e.g., a file) instead. This implies that the specified object exists, but is of the wrong type. For example, one of the parameters to FSCreateFileUnicode is an FSRef of the directory where the file will be created; if the FSRef actually refers to a file, this error is returned.

errFSForkNotFound -1409

An attempt to specify a fork of a given file or directory, but that particular fork does not exist.

errFSNameTooLong -1410

A file or fork name was too long. This means that the given name could never exist; this is different from a “file not found” or errFSForkNotFound error.

errFSMissingName -1411

A required file or fork name parameter was a NULL pointer, or the length of a filename was zero.

errFSBadPosMode -1412

Reserved or invalid bits in a positionMode field were set. For example, the FSReadFork call does not support newline mode, so setting the newline bit or a newline character in the positionMode parameter would cause this error.

errFSBadAllocFlags -1413

Reserved or invalid bits were set in an FSAllocationFlags parameter.

errFSNoMoreItems -1417

There are no more items to return when enumerating a directory or searching a volume. Note that FSCatalogSearch returns this error, whereas the PBCatSearch functions would return eofErr.

errFSBadItemCount -1418

The maximumObjects parameter to FSGetCatalogInfoBulk or FSCatalogSearch was zero.

errFSBadSearchParams -1419

The search criteria to FSCatalogSearch are invalid or inconsistent.

errFSRefsDifferent -1420

The two FSRef structures passed to FSCompareFSRefs are for different files or directories. Note that a volume format may be able to compare the FSRef structures without searching for the files or directories, so this error may be returned even if one or both of the FSRef structures refers to non-existent objects.

errFSForkExists -1421

An attempt to create a fork, but that fork already exists.

errFSBadIteratorFlags -1422

The flags passed to FSOpenIterator are invalid, such as setting a bit that is currently reserved.

errFSIteratorNotFound -1423

The value of an FSIterator parameter does not correspond to any currently open iterator.

errFSIteratorNotSupported -1424

The iterator flags or container of an FSIterator are not supported by that call. For example, in the initial release, the FSCatalogSearch call only supports an iterator whose container is in the volume’s root directory and whose flags are kFSIterateSubtree (i.e., an iterator for the entire volume’s contents). Similarly, in the initial release, FSGetCatalogInfoBulk only supports an iterator whose flags are kFSIterateFlat.

afpAccessDenied -5000

User does not have the correct access to the file

Directory cannot be shared

afpBadUAM -5002

User authentication method is unknown

afpBadVersNum -5003

Workstation is using an AFP version that the server doesn’t recognize

afpDenyConflict -5006

Requested user permission not possible

afpNoMoreLocks -5015

No more ranges can be locked

afpNoServer -5016

Server is not responding

afpRangeNotLocked -5020

Specified range was not locked

afpRangeOverlap -5021

Part of range is already locked

afpUserNotAuth -5023

User authentication failed (usually, password is not correct)

afpObjectTypeErr -5025

A directory exists with that name

Directory not found

Folder locking not supported by volume

Object was a file, not a directory

afpContainsSharedErr -5033

The directory contains a share point

afpIDNotFound -5034

File ID not found

afpIDExists -5035

File ID already exists

afpCatalogChanged -5037

Catalog has changed and search cannot be resumed

afpSameObjectErr -5038

Source and destination files are the same

afpBadIDErr -5039

File ID not found

afpPwdExpiredErr -5042

Password has expired on server

afpInsideSharedErr -5043

The directory is inside a shared directory

afpBadDirIDType -5060

Not a fixed directory ID volume

afpCantMountMoreSrvre -5061

Maximum number of volumes has been mounted

afpAlreadyMounted -5062

Volume already mounted

afpSameNodeErr -5063

Attempt to log on to a server running on the same machine


© 2001 Apple Computer, Inc. (Last Updated July 17, 2001)