public FileType GetFileType() { if (string.IsNullOrEmpty(Location)) { return(FileType.Unknown); } var category = FTT.GetFileCategory(Location); switch (category) { case FileCategory.Archive: return(FileType.Archive); case FileCategory.Audio: return(FileType.Audio); case FileCategory.Code: return(FileType.Code); case FileCategory.Document: return(FileType.Document); case FileCategory.Image: return(FileType.Image); case FileCategory.Presentation: return(FileType.Presentation); case FileCategory.PDF: return(FileType.PDF); case FileCategory.Spreadsheet: return(FileType.Spreadsheet); case FileCategory.Video: return(FileType.Video); default: return(FileType.Text); } }
public static bool IsDocumentFile(string filename) { return(FTT.GetFileCategory(filename) == FileCategory.Document); }
public static bool IsVideoFile(string filename) { return(FTT.GetFileCategory(filename) == FileCategory.Video); }
public static bool IsAudioFile(string filename) { return(FTT.GetFileCategory(filename) == FileCategory.Audio); }
public static bool IsImageFile(string filename) { return(FTT.GetFileCategory(filename) == FileCategory.Image); }