/// <summary> /// Returns a list of directories // Get list of child folders /// </summary> /// <param name="path">subPath in directory</param> /// <returns></returns> public IEnumerable <string> GetDirectoryRecursive(string path) { var fullFilePath = _appSettings.DatabasePathToFilePath(path); if (fullFilePath == null) { return(Enumerable.Empty <string>()); } var folders = new StorageHostFullPathFilesystem(_logger).GetDirectoryRecursive(fullFilePath); // Used For subfolders // convert back to subPath style return(_appSettings.RenameListItemsToDbStyle(folders.ToList())); }
/// <summary> /// Returns a list of Files in a directory (non-Recursive) /// to filter use: /// ..etAllFilesInDirectory(subPath) /// .Where(ExtensionRolesHelper.IsExtensionExifToolSupported) /// </summary> /// <param name="path">subPath path relative to the database</param> /// <returns></returns> public IEnumerable <string> GetAllFilesInDirectory(string path) { var fullFilePath = _appSettings.DatabasePathToFilePath(path); // null is not found if (fullFilePath == null) { return(Enumerable.Empty <string>()); } var imageFilesList = new StorageHostFullPathFilesystem(_logger).GetAllFilesInDirectory(fullFilePath); // to filter use: // ..etAllFilesInDirectory(subPath) // .Where(ExtensionRolesHelper.IsExtensionExifToolSupported) // convert back to subPath style return(_appSettings.RenameListItemsToDbStyle(imageFilesList.ToList())); }