public async Task <IFile> GetFile(string path) { var dbpath = new DBPath(path); var fileInfo = await filesystem.FileInfoForPathAsync(dbpath); return(new DropboxFile(fileInfo, filesystem)); }
public async Task WriteString(string contents) { await fileLock.WaitAsync(); try { var file = await fileSystem.OpenFileAsync(fileInfo.Path); await file.WriteStringAsync(contents); file.Close(); fileInfo = await fileSystem.FileInfoForPathAsync(fileInfo.Path); } finally { fileLock.Release(); } }