O'Reilly logo

VB.NET Language in a Nutshell, Second Edition by Steven Roman PhD, Paul Lomax, Ron Petrusha

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

FileAttr Function

Class

Microsoft.VisualBasic.FileSystem

Syntax

FileAttr(filenumber)
filenumber (required; Integer)

Any valid file number

Return Value

An OpenMode constant, as shown in the following table:

Mode

Value

Input

1

Output

2

Random

4

Append

8

Binary

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required