Existance and permissions of a file can be obtained by the built-in function 'access'.
Note that you need to declare the built-in function as a variable to use that.
ファイルの有無とパーミッションは「access」という組み込み関数で取得できる.
組み込み関数を使うときは変数として定義する必要があるので注意.
integer function access(path, keyword)
| Name |
Type |
Description |
Note |
| access |
integer |
File information. 0 means file exists or permittion is allowed. |
Return |
| path |
character |
File path. |
|
| keyword |
character |
Keyword to specify which information to get. ' ': existance, 'r': reading, 'w': writing and 'x': executing permission. |
|
Execute.
Kinds of information of unit number or opened file can be obtained by inquire statement.
inquire文で装置番号や開かれたファイルの各種情報を取得できる.
Important specifires
| Specifier |
Type |
Description |
| number |
integer |
Unit number. |
| exist |
logical |
Existance of unit number or file. |
| opened |
logical |
(Unit number) Connected to any file or not. (File name) Opened or not. |
| name |
character |
File name (absolute path). |
| form |
character |
|
| access |
character |
|
| recl |
integer |
|
| action |
character |
|
| position |
character |
|
| convert |
character |
|
Meanings of the specifires 'form', 'access', 'recl', 'action', 'position' and 'convert' are same to those of open statement.
'form', 'access', 'recl', 'action', 'position' 及び 'convert'の意味は
open文と同じ.
Sample
Execute.