GH_AsynchFileData

References
This class provides asynchronous methods to keep tabs on a file.

Constructors

GH_AsynchFileData

#
Asynchronous constructor. File properties will be loaded asychronously.
public GH_AsynchFileData(
filePath,
Location of file
harvestThumbnail,
If true, thumbnail data will be loaded.
callback
Callback delegate for file changes.
)

Fields

FilePath

#
Gets the location this instance is watching.
public readonly string FilePath

IsLocal

#
Gets whether Grasshopper thinks the file it is watching is on a local machine.
public readonly bool IsLocal

Properties

Callback

#
Gets or sets the callback delegate to be used when properties are updated.
public GH_AsynchFileData.FileChangedDelegate Callback { get; set; }

FileCreated

#
Gets the date at which the file was created.
public DateTime FileCreated { get; }

FileExists

#
Gets whether the file exists. Note that this property returns false if DataExists=False, regardless of whether the file exists.
public bool FileExists { get; }

FileLastChanged

#
Gets the date at which the file was last changed.
public DateTime FileLastChanged { get; }

FileSize

#
Gets the size of the file.
public long FileSize { get; }

FileThumbnail

#
Gets the thumbnail bitmap associated with the file.
public Bitmap FileThumbnail { get; }

HarvestThumbnail

#
Gets or sets whether the thumbnail ought to be parsed. At the moment this only makes sense for GH/GHX files.
public bool HarvestThumbnail { get; set; }

IsFileData

#
Gets whether the data has been retrieved at least once.
public bool IsFileData { get; }

Methods

Dispose

#
public void Dispose()

UpdateProperties

#
Updates all file properties on the thread on which this method is called.
public void UpdateProperties()