FILE_Attr

<< Click to Display Table of Contents >>

Navigation:  ThinBASIC Modules > File > FILE: functions working on files >

FILE_Attr

 

Description

 

Return information about an open file.

 

Syntax

 

n = FILE_Attr(FileID, attribute)

 

Returns

 

Nuber

 

Parameters

 

Name

Type

Optional

Meaning

FileID

Number

No

A previously open random access file handle

attribute

Number

No

Attribute number, one of the following:

 

-3

The device type. Returns 1 for a file, 2 for a device. COMM, TCP and UDP are classified as devices.

 

0

The open state. TRUE (non-zero) if open, FALSE (zero) if closed.

 

2

The operating system file handle for the file. This handle can be used with particular Windows API calls files to manipulate files opened with thinBasic.

 

 

 

 

 

 

Remarks

 

Restrictions

 

See also

 

Examples