Ejemplo n.º 1
0
        public async Task SaveFile(ContainerDefinition containerDefinition, FileDefinition fileDefinition)
        {
            var directory = Path.Combine(_storageSettings.FileRoot, containerDefinition.Path);

            Directory.CreateDirectory(directory);

            var path = Path.Combine(directory, fileDefinition.Name);

            using (FileStream target = File.Create(path))
            {
                await target.WriteAsync(fileDefinition.Data, 0, fileDefinition.Data.Length);
            }
        }
Ejemplo n.º 2
0
        public Task SaveFile(ContainerDefinition containerDefinition, FileDefinition fileDefinition, Stream fileStream)
        {
            //var path = Path.Combine(_storageSettings.FileRoot, containerDefinition.Name, fileDefinition.Path);

            //if (File.Exists(path))
            //{
            //    File.Delete(path);
            //}

            //using (var file = new FileStream(path, FileMode.CreateNew))
            //{
            //    await fileStream.CopyToAsync(file);
            //}
            throw new System.NotImplementedException();
        }
Ejemplo n.º 3
0
 public Task <string> GetFileUrl(ContainerDefinition containerDefinition, FileDefinition fileDefinition)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 4
0
 public Task <Stream> GetFile(ContainerDefinition containerDefinition, FileDefinition fileDefinition)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 5
0
 public Task <bool> FileExists(ContainerDefinition containerDefinition, FileDefinition fileDefinition)
 {
     throw new System.NotImplementedException();
 }
Ejemplo n.º 6
0
 public Task DeleteFile(ContainerDefinition containerDefinition, FileDefinition fileDefinition)
 {
     throw new System.NotImplementedException();
 }