ilEFSGetFileInfo(3X)
NAME
ilEFSGetFileInfo() − return information on a file
SYNOPSIS
ilBool
ilEFSGetFileInfo (
ilEFSFile file,
ilEFSFileInfo *pInfo);
DESCRIPTION
ilEFSGetFileInfo() returns information on the given file, or returns FALSE if an error occurs.
file is a file opened by ilEFSOpen().
*pInfo receives the contents of an ilEFSFileInfo data structure, which contains the following fields:
fileType is the type of file. For more information on the file type, pass fileType to ilEFSGetFileTypeInfo().
openMode is the mode used to open this file.
howFound is the mask value of searchOptions when ilEFSOpen() opened this file. For example, if the file type was selected because its extension in the file name matched one in its list, howFound would contain IL_EFS_BY_EXTENSION.
attributes is a bit set of attributes for the file type handler for this file. It is the same field as the attributes field of the ilEFSFileTypeInfo data structure returned by ilEFSGetFileTypeInfo(). (Note that the bits indicate the capabilities of the file type, not the actual file. For example, attributes could indicate multi-page reads are possible, although the file has only one page or was not opened in read mode.)
The following masks are defined:
IL_EFS_MULTI_PAGE_READS
indicates reading multiple pages is supported
IL_EFS_MULTI_PAGE_WRITES
indicates writing multiple pages is supported
IL_EFS_MASK_READS indicates reading mask images is supported
IL_EFS_MASK_WRITES indicates writing mask images is supported
IL_EFS_SCALEABLE_READS
indicates images can be read at different sizes
nPages is the number of pages in the file, with one image per page. If openMode is IL_EFS_WRITE, nPages is zero (0); it may also be zero (0) if multi-page reads are supported and the actual number of pages cannot be determined efficiently.
inUse is TRUE if this file is being used within a pipe, such as being used by an ilEFSReadImage() or ilEFSWriteImage() call.
reserved is a value that must be zero; this parameter is reserved for future use.
RETURN VALUE
Upon successful completion, ilEFSGetFileInfo() returns TRUE.
ERRORS
If the call fails, context->error receives a non-zero error code.
EXAMPLE
The following example uses ilEFSGetFileInfo() to get information about a file opened by ilEFSOpen(), and then uses ilEFSGetFileTypeInfo() to get information about the file type.
ilEFSFile file;
ilEFSFileInfo info;
ilEFSFileTypeInfo
.
.
.
if (!ilEFSGetFileInfo(file, &info))
return (context->error);
if (!ilEFSGetFileTypeInfo (info.fileType, &tinfo))
return (context->error);
AUTHOR
ilEFSGetFileInfo() was developed by HP.
SEE ALSO
ilEFSReadImage(3X), ilEFSWriteImage(3X), ilEFSGetFileTypeInfo(3X), ilerror(3X).
Using the Image Developer’s Kit.
Hewlett-Packard Company — Image Library: February, 1995