Package org.syncany.config.to

Examples of org.syncany.config.to.FolderTO


      // Add to config if it's not already in there
      if (!folderExists) {
        logger.log(Level.INFO, "Adding folder to daemon config: " + localDirPath + ", and saving config at " + daemonConfigFile);

        daemonConfigTO.getFolders().add(new FolderTO(localDirPath));
        daemonConfigTO.save(daemonConfigFile);

        return true;
      }
      else {
        return false;
      }
    }
    else {
      FolderTO localDirFolderTO = new FolderTO(localDir.getAbsolutePath());
      createAndWriteDaemonConfig(daemonConfigFile, Arrays.asList(new FolderTO[] { localDirFolderTO }));

      return true;
    }
  }
View Full Code Here


  }

    public static DaemonConfigTO createAndWriteExampleDaemonConfig(File daemonConfigFile) throws ConfigException {
      File defaultFolder = new File(System.getProperty("user.home"), UserConfig.DEFAULT_FOLDER);

      FolderTO defaultFolderTO = new FolderTO();
      defaultFolderTO.setPath(defaultFolder.getAbsolutePath());
      defaultFolderTO.setWatchOptions(new WatchOperationOptions());

      return createAndWriteDaemonConfig(daemonConfigFile, Arrays.asList(new FolderTO[] { defaultFolderTO }));
  }
View Full Code Here

TOP

Related Classes of org.syncany.config.to.FolderTO

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.