Contents Developing Windows Clients  

IFileInfo Interface

The FileInfo interface provides additional information about a SAS Fileref. This interface cannot make any changes to any attributes.

IFileInfo Interface

Full Description

Attributes

StatusMessage Property
StatusValue Property
PhysicalName Property
RecordFormat Property
DataLength Property
Filesize Property
ModifiedTime Property
AccessMethod Property

Methods

GetInfoProperties Method
GetStandardProperties Method

Enumerations

IFileInfoStatus Enumeration
Description



Readonly Property StatusMessage

Returns a textual analog of the StatusValue attribute; indicates the status of the physical file to which this fileref refers.

Type: String

Description

Example

Usage


Readonly Property StatusValue

One of the Status enumeration values; indicates the status of the physical file that this fileref refers to.

Type: Long

Description

Example

Usage


Readonly Property PhysicalName

Name as known to the OS host.

Type: String

Description

The fileref name is a logical name that refers to this physical name. The format of the physical name is dependent on the operating system and the access method. One of the reasons for having a fileref refer to they physical name is that the fileref can be used the same, without regard to the underlying physical medium.

Example

Usage


Readonly Property RecordFormat

Record Format.

Type: String

Description

Example

Usage


Readonly Property DataLength

Available data length.

Type: Long

Description

Example

Usage


Readonly Property Filesize

Size of the file in bytes.

Type: Double

Description

Example

Usage


Readonly Property ModifiedTime

The last time the file was modified.

Type: Date

Description

The last time that the file was modified. This is generally in some form of local time.

This local time may be based on the timezone of the SAS IOM server, or it may be the local time of the computer that stored the timestamp. No guarantee is made about whose local time is represented. Also, time zone is not just set by geography, but also by Daylight Savings Time changes. Thus, the same computer can read and write timestamps in different time zones in different parts of the year.

For some files on some hosts, it may be possible to retrieve a date, but not time-of-day. In some other cases, even the date may be unknown. For unknown dates, the SAS System base date of January 1 1960 will generally be returned.

Given the number of filesystems with which SAS Software interacts, it not possible to guarantee the accuracy of this datetime.

Example

Usage


Readonly Property AccessMethod

Also known as the device-type on a FILENAME statement.

Type: String

Description

The access method determines what the underlying physical medium is, and how to interpret the physical name. Various hosts support different access methods.

Example

Usage


Method GetInfoProperties

Returns host/engine specific properties of the fileref.

Description

This method is most suited for displaying the information to the user in a properties type of dialog. Use of this information in logic is not advised since this information will be different between hosts and may change between releases of SAS.

Usage

Parameters

Name Direction Type Description
propertyNames  out  String(index)  A returned array of property names that corresponds to what is returned in the propertyValues.  
propertyValues  out  String(index)  A set of values for each property name returned in propertyNames.  

Example

Dim properties As PropertyForm
Dim obFileref As SAS.Fileref
Dim obFileInfo As SAS.IFileInfo
Dim standardPropertyNames() As String
Dim standardPropertyValues() As String
Dim infoPropertyNames() As String
Dim infoPropertyValues() As String
Dim i As Integer
Dim item As ListItem
Set obFileInfo = obSAS.FileService.UseFileref(Form1.ListView1.SelectedItem.Text)
Set obFileref = obFileInfo
PropertyForm.Caption = obFileref.FilerefName
obFileInfo.GetStandardProperties standardPropertyNames, standardPropertyValues
obFileInfo.GetInfoProperties infoPropertyNames, infoPropertyValues
For i = 1 To UBound(standardPropertyNames)
    Set item = PropertyForm.propertyList(0).ListItems.Add()
    item.Text = standardPropertyNames(i)
    item.SubItems(1) = standardPropertyValues(i)
Next
For i = 1 To UBound(infoPropertyNames)
    Set item = PropertyForm.propertyList(1).ListItems.Add()
    item.Text = infoPropertyNames(i)
    item.SubItems(1) = infoPropertyValues(i)
Next i
PropertyForm.Show

See Also


Method GetStandardProperties

Returns properties that are common to all hosts (called General Properties in the SAS Explorer.)

Description

These properties are also available as individual attributes on this interface. Programmers should choose to call GetStandardProperties when displaying all properties to the user; and call individual properties when using that property. This minimizes the number of out-of-process calls.

Usage

A returned array of property names that corresponds to what is returned in the propertyValues.

Parameters

Name Direction Type Description
propertyNames  out  String(index)   
propertyValues  out  String(index)  Returns a set of values for each property name returned in propertyNames.  

Example

See Also


Enum IFileInfoStatus

Possible values for the status of the physical file that this fileref refers to.

Description

Usage

Member Description
IFileInfoStatusFileExists  Everything is OK.  
IFileInfoStatusDeviceOffline  The device is offline.  
IFileInfoStatusDeviceNotAttached  The hardware is not attached.  
IFileInfoStatusBadFile  The name exists but is not a physical file.  
IFileInfoStatusNoDetect  The status of the physical file can only be determined after being opened.  
IFileInfoStatusNotDisk  The device is not a disk.  
IFileInfoStatusNoFile  The physical file does not exist.  
IFileInfoStatusUnknownWarning  Check the StatusMessage attribute.  
IFileInfoStatusUnknownError  Check the StatusMessage attribute.  

Contents Developing Windows Clients