GETATTR

(Difference between revisions)
Jump to: navigation, search
Line 43: Line 43:
 
<span style="font-weight: bold;">Return value</span>
 
<span style="font-weight: bold;">Return value</span>
  
| valign="top" width="68%" bgcolor="#ffff99" style="width: 83px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" |  
+
| valign="top" width="68%" bgcolor="#ffff99" style="width: 122px; background-color: rgb(255, 255, 153); border: 1px solid rgb(0, 0, 0);" |  
<span style="font-weight: bold;">Open mode</span>
+
<span style="font-weight: bold;">DOS Attribute</span>
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 51: Line 51:
  
 
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |  
INPUT
+
Read Only
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 58: Line 58:
  
 
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |  
OUTPUT
+
Hidden
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="59%" style="width: 122px; border: 1px solid rgb(0, 0, 0);" |
 +
4
 +
 
 +
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |
 +
System File
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 65: Line 72:
  
 
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |  
APPEND
+
Volume Label
 +
 
 +
|- style="vertical-align: top;"
 +
| valign="top" width="59%" style="width: 122px; border: 1px solid rgb(0, 0, 0);" |
 +
16
 +
 
 +
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |
 +
Sub Directory
  
 
|- style="vertical-align: top;"
 
|- style="vertical-align: top;"
Line 72: Line 86:
  
 
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |  
 
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |  
BINARY
+
Archive
  
 +
|- style="vertical-align: top;"
 +
| valign="top" width="59%" style="width: 122px; border: 1px solid rgb(0, 0, 0);" |
 +
64,128
 +
 +
| valign="top" width="68%" style="width: 83px; border: 1px solid rgb(0, 0, 0);" |
 +
Reserved
 
|}
 
|}
 
</div>
 
</div>
 
<span style="font-family: Arial;">&nbsp;</span>
 
<span style="font-family: Arial;">&nbsp;</span>
  
<span style="font-family: Arial;">&nbsp;</span><span style="font-size: 10pt;">A file could have an attribute of 3 (hidden+ read only)</span>
+
<span style="font-family: Arial;">&nbsp;</span>
 +
A file could have an attribute of 3 (hidden+ read only)
  
 
= <span class="f_Header">See also</span> =
 
= <span class="f_Header">See also</span> =

Revision as of 23:03, 21 November 2014

Contents

Action

Returns the file Attribute.

 

 

Syntax

bFileAttribut = GETATTR([sFile])

 

 

Remarks

bFileAttribut

Numeric variable which is assigned with the file attribute.

sFile

The name of the file (no wildcard) to get the attribute from.
You may also omit the name in which case the file will be used previous found by the DIR() function.

 

This functions returns the DOS file attributes. A file can have multiple attributes.

 

Return value

DOS Attribute

1

Read Only

2

Hidden

4

System File

8

Volume Label

16

Sub Directory

32

Archive

64,128

Reserved

 

  A file could have an attribute of 3 (hidden+ read only)

See also

INITFILESYSTEM , OPEN , CLOSE, FLUSH , PRINT, LINE INPUT, LOC, LOF , EOF , FREEFILE , SEEK , BSAVE , BLOAD , KILL ,DISKFREE , DISKSIZE , GET , PUT, FILEDATE , FILETIME , FILEDATETIME , DIR , FILELEN, WRITE , INPUT

 

Partial Example


'open the file in BINARY mode
Print Getattr("somefile.bin")

Languages   English  
Personal tools
Namespaces
Variants
Actions
Navigation
Language