FILEINFO Function

Returns the path of the file referenced by a file variable.

Syntax

FILEINFO({fileVar})

Syntax Elements

fileVar The name of a variable containing a file reference (assigned via an OPEN statement). If fileVar is not specified, the internal default file variable is used; that is, the file used is that most recently opened without a file variable.

Return Value

FILEINFO returns a dynamic array containing the following:

Attribute 1 An integer representing the type of file referenced by fileVar. One of the following:

0 File.

1 Sequential file.

2 Select list.

3 Index.

Attribute 2 An integer representing the file level. One of the following:

0 SYSTEM.

1 Account master dictionary.

2 File dictionary.

3 File data section.

Attribute 3 Set to 1 if the file has case insensitive item-ids; otherwise 0.

Attribute 4 Set to 1 if the file was opened via a Q pointer; otherwise 0.

Attribute 5 Set to 1 if the account name was specified when the file was opened; otherwise 0.

Attribute 6 Set to 1 if the file is update protected; otherwise 0.

Attribute 7 Set to 1 if the file is transaction logged; otherwise 0.

Attribute 8 Set to 1 if the file is on a remote database; otherwise 0.

If fileVar is not a file variable, FILEINFO returns null.

Examples

The following table lists return values for the SYSMAN account:

 

Return value (attributes of dynamic array)

File-specifier

1 (type)

2 (level)

3 (case)

4 (Q-ptr)

5 (account)

6 (update)

7 (TL)

8 (remote)

SYSTEM

0

0

0

1

1

0

1

0

/SYSTEM/

0

0

0

0

1

0

1

0

/SYSPROG/

0

1

0

0

1

0

1

0

MD

0

1

0

0

0

0

1

0

DICT BP

0

2

0

0

0

0

1

0

/SYSPROG/BP

0

3

0

0

1

0

1

0

SYSPROG,BP,

0

3

0

0

1

0

1

0

BP

0

3

0

0

0

0

0

0

BP,BP

0

3

0

0

0

0

0

0

QFILE

0

3

0

1

1

0

0

0

See Also

FILEPATH function.