public static async Task <IResourceInfo> WriteTextFileAsync(this IResourceProvider resourceProvider, string path, string value, IImmutableSession metadata = default) { using (var stream = await ResourceHelper.SerializeTextAsync(value, metadata.ThisOrEmpty().Get(Use <IAnyNamespace> .Namespace, x => x.Encoding, Encoding.UTF8))) { return(await resourceProvider.PutAsync(CreateUri(path), stream, metadata.ThisOrEmpty().Set(Use <IResourceNamespace> .Namespace, x => x.Format, MimeType.Text))); } }
public PhysicalFileProvider(IImmutableSession metadata = default) : base(metadata.ThisOrEmpty()) { }
public static async Task <IResourceInfo> DeleteFileAsync(this IResourceProvider resourceProvider, string path, IImmutableSession metadata = default) { return(await resourceProvider.DeleteAsync(CreateUri(path), metadata.ThisOrEmpty().Set(Use <IResourceNamespace> .Namespace, x => x.Format, MimeType.Text))); }