Issue 13908 - Scripting: GetAttr does not return proper value
Summary: Scripting: GetAttr does not return proper value
Status: ACCEPTED
Alias: None
Product: udk
Classification: Code
Component: code (show other issues)
Version: OOo 1.0.3
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: AOO PleaseHelp
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-28 18:56 UTC by andrew
Modified: 2017-05-20 11:29 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description andrew 2003-04-28 18:57:27 UTC
On my computer, c:\io.sys is a System, read-only hidden, archived file. I am 
only told that it is read-only.

1.0.3.1 on windows xp.

Sub ExampleGetAttr
	Rem Should say " Read-Only Hidden System Archive"
	Rem says " Read-Only"
	Print FileAttributeString(GetAttr("C:\IO.SYS"))	
	Rem Should say " Archive" says "Normal"
	Print FileAttributeString(GetAttr("C:\AUTOEXEC.BAT"))
	Rem "Directory"	
	Print FileAttributeString(GetAttr("C:\WINDOWS"))	
End Sub
Function FileAttributeString(x As Integer) As String
	Dim s As String
	If (x = 0) Then
		s = "Normal"
	Else
		s = ""
		If (x AND 16) <> 0 Then s = "Directory"
		If (x AND 1) <> 0 Then s = s & " Read-Only"
		If (x AND 2) <> 0 Then s = " Hidden"
		If (x AND 4) <> 0 Then s = s & " System"
		If (x AND 8) <> 0 Then s = s & " Volume"
		If (x AND 32) <> 0 Then s = s & " Archive"
	End If
	FileAttributeString = s
End Function
Comment 1 ooo 2003-06-25 12:33:01 UTC
StarBASIC runtime, not API
Comment 2 ab 2003-07-03 12:24:52 UTC
The general problem is that these attributes are Windows specific
and currently only system independent attributes are supported.
Comment 3 christof.pintaske 2004-06-17 16:51:22 UTC
cp: retargeted to Office-Later due to limited ressources
Comment 4 Marcus 2017-05-20 11:29:35 UTC
Reset assigne to the default "issues@openoffice.apache.org".