public IEnumerable<IFileSystem> GetFileSystems () { var fss = new List<IFileSystem> (); var session = Session.SharedSession; if (session != null && session.IsLinked) { var fs = new DropboxFileSystem (session); fss.Add (fs); } return fss; }
public DropboxFile(DropboxFileSystem fs, Metadata meta) { this.FileSystem = fs; this.meta = meta; Path = meta.PathDisplay; if (Path.StartsWith("/", StringComparison.Ordinal)) { Path = Path.Substring(1); } DropboxPath = Path; }
public IEnumerable <IFileSystem> GetFileSystems() { var fss = new List <IFileSystem> (); var session = DropboxSession.SharedSession; if (session != null && session.IsLinked) { var fs = new DropboxFileSystem(session); fss.Add(fs); } return(fss); }
public DropboxFileSystemProvider (string key, string secret) { fss = new List<DropboxFileSystem> (); var manager = new DBAccountManager (key, secret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null && account.Linked) { var dbfs = new DBFilesystem (account); var fs = new DropboxFileSystem (account, dbfs); fss.Add (fs); DBFilesystem.SharedFilesystem = dbfs; } }
public DropboxFileSystemProvider(string key, string secret) { fss = new List <DropboxFileSystem> (); var manager = new DBAccountManager(key, secret); DBAccountManager.SharedManager = manager; var account = manager.LinkedAccount; if (account != null && account.Linked) { var dbfs = new DBFilesystem(account); var fs = new DropboxFileSystem(account, dbfs); fss.Add(fs); DBFilesystem.SharedFilesystem = dbfs; } }
bool HandleDropboxUrl (NSUrl url) { var session = Session.SharedSession; if (session.HandleOpenUrl (url) && session.IsLinked) { var fman = FileSystemManager.Shared; var fs = fman.FileSystems.OfType<DropboxFileSystem> ().FirstOrDefault (x => x.UserId == session.UserIds.FirstOrDefault ()); if (fs != null) { Debug.WriteLine ("Dropbox: Existing account detected!"); } else { Debug.WriteLine ("Dropbox: App linked successfully!"); fs = new DropboxFileSystem (session); FileSystemManager.Shared.Add (fs); } if (DropboxFileSystemProvider.AddCompletionSource != null) { DropboxFileSystemProvider.AddCompletionSource.SetResult (fs); DropboxFileSystemProvider.AddCompletionSource = null; } if (fs.IsAvailable) { SetFileSystemAsync (fs, true).ContinueWith (t => { if (t.IsFaulted) { Debug.WriteLine (t.Exception); } }); } return true; } return false; }
public DropboxFile(DropboxFileSystem fs, Metadata meta) { this.FileSystem = fs; this.meta = meta; }
public DropboxFile (DropboxFileSystem fs, Metadata meta) { this.FileSystem = fs; this.meta = meta; }