Package com.dropbox.core.DbxEntry

Examples of com.dropbox.core.DbxEntry.WithChildren


  public void syncLocalToDropbox(DbxClient client) throws DbxException, IOException {
    logger.debug("Started synchronization from local to Dropbox ...");
   
    Map<String, Long> dropboxEntries = new HashMap<String, Long>();

    WithChildren metadata = client.getMetadataWithChildren("/");
    File dropboxEntryFile = new File(contentDir + DROPBOX_ENTRIES_FILE_NAME);
    if (!dropboxEntryFile.exists() || !metadata.hash.equals(lastHash)) {
      collectDropboxEntries(client, dropboxEntries, "/");
      serializeDropboxEntries(dropboxEntryFile, dropboxEntries);
      lastHash = metadata.hash;
View Full Code Here


      }
    }
  }

  private void collectDropboxEntries(DbxClient client, Map<String, Long> dropboxEntries, String path) throws DbxException {
    WithChildren entries = client.getMetadataWithChildren(path);
    for (DbxEntry entry : entries.children) {
      if (entry.isFolder()) {
        collectDropboxEntries(client, dropboxEntries, entry.path);
      } else {
        dropboxEntries.put(entry.path, entry.asFile().lastModified.getTime());
View Full Code Here

TOP

Related Classes of com.dropbox.core.DbxEntry.WithChildren

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.