mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-19 04:34:18 +01:00
update use of FileAttributes
This commit is contained in:
@@ -54,7 +54,7 @@ namespace MediaBrowser.Controller.IO
|
||||
|
||||
foreach (var entry in entries)
|
||||
{
|
||||
var isDirectory = (entry.Attributes & FileAttributes.Directory) == FileAttributes.Directory;
|
||||
var isDirectory = entry.IsDirectory;
|
||||
|
||||
var fullName = entry.FullName;
|
||||
|
||||
|
||||
@@ -84,7 +84,7 @@ namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
get
|
||||
{
|
||||
return (FileInfo.Attributes & FileAttributes.Directory) == FileAttributes.Directory;
|
||||
return FileInfo.IsDirectory;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -95,7 +95,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
|
||||
public IEnumerable<FileSystemMetadata> GetFiles(string path, bool clearCache)
|
||||
{
|
||||
return GetFileSystemEntries(path, clearCache).Where(i => (i.Attributes & FileAttributes.Directory) != FileAttributes.Directory);
|
||||
return GetFileSystemEntries(path, clearCache).Where(i => !i.IsDirectory);
|
||||
}
|
||||
|
||||
public FileSystemMetadata GetFile(string path)
|
||||
@@ -112,7 +112,7 @@ namespace MediaBrowser.Controller.Providers
|
||||
|
||||
public IEnumerable<FileSystemMetadata> GetDirectories(string path)
|
||||
{
|
||||
return GetFileSystemEntries(path, false).Where(i => (i.Attributes & FileAttributes.Directory) == FileAttributes.Directory);
|
||||
return GetFileSystemEntries(path, false).Where(i => i.IsDirectory);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user