5.1.8 Long-Filename Functions

The network driver can provide a variety of long-filename functions. The long-filename functions give access to files with names that do not fit the MS-DOS standard filename convention on network drives. These are the following long filename functions.

Function Description

LFNCopy Copies a file.
LFNDelete Deletes a file.
LFNFindClose Ends the search for matching files.
LFNFindFirst Searches for the first file with a matching name.
LFNFindNext Searches for the next file with a matching name.
LFNGetAttributes Retrieves file attributes.
LFNGetVolumeLabel Retrieves the volume label.
LFNMKDir Creates a directory.
LFNMove Moves a file.
LFNParse Parses paths.
LFNRMDir Removes a directory.
LFNSetAttributes Sets file attributes.
LFNSetVolumeLabel Sets the volume label.
LFNVolumeType Specifies volume type.

Typically, these functions are called only when a network drive with long filenames is detected. In other words, they do not need to support local drives. The exception is the LFNCopy function, which must be able to copy to or from any type of volume.

The return value is typically an MS-DOS error function (as returned from MS-DOS functions when the carry flag is set, or from Interrupt 21h Function 59h, Get Extended Error Information). If a function returns the special error value 0xFFFF, then the network error message functions will be called to retrieve error message text.

The maximum length of any long filename will be assumed to be 260 characters, including the terminator.

File-attribute values are identical to MS-DOS file-attribute fields.