mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-23 09:14:45 +03:00
fixed issue of not seeing network shares
This commit is contained in:
@@ -216,103 +216,6 @@ namespace MediaBrowser.Controller.IO
|
||||
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = NativeMethods.MAX_ALTERNATE)]
|
||||
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>
|
||||
|
||||
Reference in New Issue
Block a user