Name
FileAttr Function
Class
Microsoft.VisualBasic.FileSystem
Syntax
FileAttr(filenumber)-
filenumber Use: Required
Data Type: Integer
Any valid file number
Return Value
An OpenMode constant, as shown in the following
table:
|
Mode |
Value |
|---|---|
|
|
1 |
|
|
2 |
|
|
4 |
|
|
8 |
|
|
32 |
Description
Returns the file-access mode for a file opened using the FileOpen procedure
VB .NET/VB 6 Differences
In VB 6, FileAttr includes a superfluous
returntype parameter that must be set to 1
or an error results. In VB .NET, the parameter has been eliminated.
See Also
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access