/// <summary> /// Gets the date and time the specified file or directory was last written to. /// </summary> /// <param name="device">The device.</param> /// <param name="path">The file or directory for which to obtain access date and time information.</param> /// <returns>A <see cref="DateTime"/> structure set to the date and time that the specified file or directory was last written to. This value is expressed in local time.</returns> public static DateTime GetLastWriteTime(RemoteDevice device, string path) { using RemoteDevice.DeviceFile f = new RemoteDevice.DeviceFile(device.ISession, path); return(f.GetFileTimes().LastWriteTime); }
/// <summary> /// Refreshes the state of the object. /// </summary> public void Refresh() { using RemoteDevice.DeviceFile f = new RemoteDevice.DeviceFile(Device.ISession, FullPath); ftimes = f.GetFileTimes(); }