Пример #1
0
        public async Task <FileObject> AddFileAsync(string relativeFileName, Stream fileContent, FileOption fileOption, int bufferSize)
        {
            var file = new FileObject(FullName + relativeFileName);
            await file.WriteAsync(fileContent, fileOption, bufferSize);

            return(file);
        }
Пример #2
0
        public async Task <FileObject> AddFileAsync(string relativeFileName, byte[] fileContent, FileOption fileOption, int offset = 0,
                                                    int?count = null)
        {
            var file = new FileObject(FullName + relativeFileName);
            await file.WriteAsync(fileContent, fileOption, offset, count);

            return(file);
        }
Пример #3
0
        public async Task <FileObject> AddFileAsync(string relativeFileName, string fileContent, FileOption fileOption,
                                                    Encoding encoding = null, int bufferSize = 4096)
        {
            var file = new FileObject(FullName + relativeFileName);
            await file.WriteAsync(fileContent, fileOption, encoding, bufferSize);

            return(file);
        }