Kbase P16135: How to use FILE-INFO Function
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  25/05/2005 |
|
Status: Verified
GOAL:
How to use FILE-INFO Function
FACT(s) (Environment):
Progress v. 9.x
FIX:
A handle to an operating system file.
SYNTAX
FILE-INFO [ :attribute ]
attribute
Specifies an attribute of the FILE-INFO handle. The attributes are shown
in this table.
Attribute
FILE-CREATE-DATE Attribute DATE -
FILE-CREATE-TIME Attribute INTEGER -
FILE-MOD-DATE Attribute DATE -
FILE-MOD-TIME Attribute INTEGER -
FILE-NAME Attribute CHARACTER
FILE-SIZE Attribute INTEGER -
FILE-TYPE Attribute CHARACTER -
FULL-PATHNAME Attribute CHARACTER -
PARSE-STATUS Attribute CHARACTER -
TYPE Attribute CHARACTER -
EXAMPLE
After you set the value of the FILE-NAME attribute, you can read the
values of the other attributes.
r-osfile.p
DEFINE VARIABLE os-file AS CHARACTER FORMAT "x(60)" LABEL "File".
REPEAT:
SET os-file WITH FRAME osfile-info.
FILE-INFO:FILE-NAME = os-file.
DISPLAY FILE-INFO:FULL-PATHNAME FORMAT "x(60)" LABEL "Full Path"
FILE-INFO:PATHNAME FORMAT "x(60)" LABEL "Path"
FILE-INFO:FILE-TYPE LABEL "Type"
WITH FRAME osfile-info SIDE-LABELS TITLE "OS File Info".
END.