public Task <IStoreCollection> GetCollectionAsync(Uri uri, IHttpContext httpContext) { LogInfo(Strings.WebDavProcessingCollectionRequestFormat, uri, httpContext.Request.HttpMethod); var path = uri.LocalPath; var name = Path.GetFileName(path); if (IsIgnoredFile(name)) { return(Task.FromResult((IStoreCollection)null)); } return(Task.Run(() => { try { var stat = EfsFileManager.Instance.GetEntry(_manager, path); if (stat.Mode == 0) { LogWarning(Strings.WebDavWarningPathNotFoundFormat, path); return null; } var item = EfsStoreCollection.Create(_manager, name, path, path, _readOnly, _logger, _logLevel); return (IStoreCollection)item; } catch (Exception ex) { LogError(Strings.WebDavErrorGetReadableStreamFormat, path, ex.Message); return null; } })); }
public static EfsStoreCollection Create(QcdmManager manager, string name, string uniqueKey, string path, bool isReadOnly, Logger logger, LogLevel logLevel) { var item = new EfsStoreCollection(manager, name, uniqueKey, path, isReadOnly, logger, logLevel); item.Initialize(); return(item); }