FileAttr Function

Fano fooliishshonni fa'nantino injote garinni woy faylete injo kiiro qoltanno. Faylete injo kiiro assishshu amuraati aana irkidhanno(OSH = Assootu amuraati kasa).

Qaagishshu Bido

If you use a 32-Bit operating system, you cannot use the FileAttr function to determine the file access number.


Hattono: Fani la'i

Syntax:


  FileAttr (Channel As Integer, Attributes As Integer)

Return value:

Intijere

Parameters:

Channel: The number of the file that was opened with the Open statement.

Attributes: Integer expression that indicates the type of file information that you want to return. The following values are possible:

1: FileAttr indicates the access mode of the file.

2: FileAttr returns the file access number of the operating system.

Eishshu sona 1 hornyinni badittoro, konni woroonni noo qolote hornyuwa loosaansitanno:

1 - EO (eote fayle fana)

2 - GUMA (gumaho fayle fana)

4 - RANDEME (hedeweelcho injora fayle fana)

8 - Qa'misa (maxxagisaho fayle fana)

32 - LAMINAATE (laminaatu gari giddo fayle fana).

Error codes:

5 Horiweelo aante woshsho

52 Horiweelo faylete su'ma woy faylete kiiro

Example:


Sub ExampleFileAttr
    Dim iNumber As Integer
    Dim sLine As String
    Dim aFile As String
    aFile = "C:\Users\ThisUser\data.txt"
    iNumber = Freefile
    Open aFile For Output As #iNumber
    #ikiiro attami, "Kuni borrote xuruuraati"
    MsgBox FileAttr(#iNumber, 1), 0, "Access mode"
    MsgBox FileAttr(#iNumber, 2), 0, "File attribute"
    Close #iNumber
End Sub

Please support us!