IDatasetNameFileStat Interface

Provides access to members that control DatasetName file-based statistics.

Members

Name Description
Read/write property StatMode The access mode.
Read/write property StatSize The size.
Read/write property StatTime The date modified/created/accessed.

IDatasetNameFileStat.StatMode Property

The access mode.

Public Property StatMode As esriDatasetFileStatAccessMode
public esriDatasetFileStatAccessMode StatMode {get; set;}

IDatasetNameFileStat.StatSize Property

The size.

Public Property StatSize As Integer
public int StatSize {get; set;}

IDatasetNameFileStat.StatTime Property

The date modified/created/accessed.

Public Function get_StatTime ( _
    ByVal dateMode As esriDatasetFileStatTimeMode _
) As Integer
Public Sub set_StatTime ( _
    ByVal dateMode As esriDatasetFileStatTimeMode, _
    ByVal pTime As Integer _
)
public int get_StatTime (
    esriDatasetFileStatTimeMode dateMode
);
public void set_StatTime (
    esriDatasetFileStatTimeMode dateMode,
    int pTime
);

Remarks

The time is set and returned as the number of seconds since 12:00:00, 1 January 1970 UTC.

To convert the type of value returned from this method to a .NET DateTime struct, a function like the following can be used:

public DateTime GetFileCreationTime(IName name)

{

  IDatasetNameFileStat datasetNameFileStat = (IDatasetNameFileStat)name;

  int ticks = datasetNameFileStat.get_StatTime(esriDatasetFileStatTimeMode.esriDatasetFileStatTimeCreation);

  DateTime baseTime = new DateTime(1970, 1, 1, 0, 0, 0, DateTimeKind.Utc);

  DateTime fileTime = baseTime.AddSeconds(ticks);

  return fileTime.ToLocalTime();

}

Classes that implement IDatasetNameFileStat

Classes Description
RasterDatasetName A container for name information about a raster dataset.

Remarks

This interface is implemented by datasets such as tables and feature classes, but only for certain data sources. For example, shapefiles and File Geodatabase feature classes implement this interface, but Personal Geodatabase feature classes do not.

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.