LibreOffice 24.8 Help
Open ๋ฌธ์ผ๋ก ์ฐ ํ์ผ์ ์ก์ธ์ค ๋ชจ๋ ๋๋ ํ์ผ ์ก์ธ์ค ๋ฒํธ๋ฅผ ํ์ํฉ๋๋ค. ํ์ผ ์ก์ธ์ค ๋ฒํธ๋ ์ด์ ์ฒด์ ์ ๋ฐ๋ผ ๋ฌ๋ผ์ง๋๋ค(OSH = Operating System Handle).
If you use a 32-Bit operating system, you cannot use the FileAttr function to determine the file access number.
์ฐธ๊ณ ํญ๋ชฉ: Open
FileAttr (Channel As Integer, Attributes As Integer)
Integer
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.
๋งค๊ฐ ๋ณ์ ์์ฑ์ 1๋ก ์ง์ ํ ๊ฒฝ์ฐ ๋ค์์ ๋ฐํ ๊ฐ์ด ์ ์ฉ๋ฉ๋๋ค.
1 - INPUT(์ ๋ ฅ์ ์ํ ํ์ผ ์ด๊ธฐ)
2 - OUTPUT(์ถ๋ ฅ์ ์ํ ํ์ผ ์ด๊ธฐ)
4 - RANDOM(์์ ์ก์ธ์ค๋ฅผ ์ํ ํ์ผ ์ด๊ธฐ)
8 - APPEND(์ถ๊ฐ๋ฅผ ์ํ ํ์ผ ์ด๊ธฐ)
32 - BINARY(์ด์ง ๋ชจ๋๋ก ํ์ผ ์ด๊ธฐ)
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
Print #iNumber, "This is a line of text"
MsgBox FileAttr(#iNumber, 1), 0, "Access mode"
MsgBox FileAttr(#iNumber, 2), 0, "File attribute"
Close #iNumber
End Sub