Getting or Setting TWAIN File System Information

LEADTOOLS provides the ability to obtain information from the TWAIN file system, and change settings within the TWAIN file system using the QueryFileSystem method and the FileSystemInfo property.

The user can direct the TWAIN file system to perform a specific action like, change a device, domain, host, or image directory; create an image directory; delete an image or an image directory; format a storage device; rename an image or an image directory; or copy images across storage devices. The user can also direct the TWAIN file system to retrieve certain information or items such as, information on the current file, the next file in the directory, the first file in the directory, etc.

The FileSystemInfo interface accesses numerous properties that are either updated by the QueryFileSystem method, or used by the QueryFileSystem method to change settings within the TWAIN file system. These properties are:

CreateTimeDate property

DeviceGroupMask property

FileSize property

FileType property

FreeMediaSpace property

InputName property

ModifiedTimeDate property

NewImageSize property

NumberOfAudioSnippets property

NumberOfFiles property

OutputName property

Recursive property

If the FileMsg parameter of the QueryFileSystem method contains one of the following flags:

FILESYSTEM_MSG_CHANGEDIRECTORY

FILESYSTEM_MSG_CREATEDIRECTORY

FILESYSTEM_MSG_DELETE

FILESYSTEM_MSG_FORMATMEDIA

FILESYSTEM_MSG_RENAME

FILESYSTEM_MSG_COPY

certain properties of the interface pointed to by the FileSystemInfo property must contain the proper information before calling this method. This method will use the provided information to change settings within the TWAIN file system.

If the FileMsg parameter of the QueryFileSystem method contains one of the following flags:

FILESYSTEM_MSG_GETCLOSE

FILESYSTEM_MSG_GETFIRSTFILE

FILESYSTEM_MSG_GETINFO

FILESYSTEM_MSG_GETNEXTFILE

this method, will update certain properties of the interface pointed to by the FileSystemInfo property with the corresponding information.

If the FileMsg parameter of the QueryFileSystem method contains the following flag:

FILESYSTEM_MSG_AUTOMATICCAPTUREDIRECTORY

this method will use information stored within certain properties of the interface pointed to by the FileSystemInfo property and will update certain properties of the interface pointed to by the FileSystemInfo property with any appropriate information.