diff options
Diffstat (limited to 'MediaBrowser.Controller/IO/NativeMethods.cs')
| -rw-r--r-- | MediaBrowser.Controller/IO/NativeMethods.cs | 97 |
1 files changed, 0 insertions, 97 deletions
diff --git a/MediaBrowser.Controller/IO/NativeMethods.cs b/MediaBrowser.Controller/IO/NativeMethods.cs index 2f15f124d..5b9bf52a8 100644 --- a/MediaBrowser.Controller/IO/NativeMethods.cs +++ b/MediaBrowser.Controller/IO/NativeMethods.cs @@ -217,103 +217,6 @@ namespace MediaBrowser.Controller.IO public string cAlternate; /// <summary> - /// Gets a value indicating whether this instance is hidden. - /// </summary> - /// <value><c>true</c> if this instance is hidden; otherwise, <c>false</c>.</value> - public bool IsHidden - { - get - { - return dwFileAttributes.HasFlag(FileAttributes.Hidden); - } - } - - /// <summary> - /// Gets a value indicating whether this instance is system file. - /// </summary> - /// <value><c>true</c> if this instance is system file; otherwise, <c>false</c>.</value> - public bool IsSystemFile - { - get - { - return dwFileAttributes.HasFlag(FileAttributes.System); - } - } - - /// <summary> - /// Gets a value indicating whether this instance is directory. - /// </summary> - /// <value><c>true</c> if this instance is directory; otherwise, <c>false</c>.</value> - public bool IsDirectory - { - get - { - return dwFileAttributes.HasFlag(FileAttributes.Directory); - } - } - - /// <summary> - /// Gets the creation time UTC. - /// </summary> - /// <value>The creation time UTC.</value> - public DateTime CreationTimeUtc - { - get - { - return ParseFileTime(ftCreationTime); - } - } - - /// <summary> - /// Gets the last access time UTC. - /// </summary> - /// <value>The last access time UTC.</value> - public DateTime LastAccessTimeUtc - { - get - { - return ParseFileTime(ftLastAccessTime); - } - } - - /// <summary> - /// Gets the last write time UTC. - /// </summary> - /// <value>The last write time UTC.</value> - public DateTime LastWriteTimeUtc - { - get - { - return ParseFileTime(ftLastWriteTime); - } - } - - /// <summary> - /// Parses the file time. - /// </summary> - /// <param name="filetime">The filetime.</param> - /// <returns>DateTime.</returns> - private DateTime ParseFileTime(FILETIME filetime) - { - long highBits = filetime.dwHighDateTime; - highBits = highBits << 32; - - var val = highBits + (long) filetime.dwLowDateTime; - - if (val < 0L) - { - return DateTime.MinValue; - } - - if (val > 2650467743999999999L) - { - return DateTime.MaxValue; - } - - return DateTime.FromFileTimeUtc(val); - } - - /// <summary> /// Gets or sets the path. /// </summary> /// <value>The path.</value> |
