Package net.sourceforge.fullsync.fs

Examples of net.sourceforge.fullsync.fs.FileSystem


    buffering = new Hashtable<String, SyncFilesBufferingProvider>();
    buffering.put("syncfiles", new SyncFilesBufferingProvider());
  }

  public final Site createConnection(final ConnectionDescription desc) throws FileSystemException, IOException, URISyntaxException {
    FileSystem fs = null;

    URI url = desc.getUri();
    String scheme = url.getScheme();

    if (scheme != null) {
      fs = schemes.get(scheme);
    }
    if (fs == null) {
      // TODO maybe we should test and correct this in profile dialog !?
      // no fs found, test for native path
      File f = new File(url.toString()); // ignore query as local won't need query
      if (f.exists()) {
        fs = schemes.get("file");
        url = f.toURI();
        desc.setUri(url);
      }
      else {
        throw new URISyntaxException(url.toString(), "Not a valid uri or unknown scheme");
      }
    }

    Site s = fs.createConnection(desc);

    String bufferStrategy = desc.getParameter("bufferStrategy");

    if ((null != bufferStrategy) && !"".equals(bufferStrategy)) {
      s = resolveBuffering(s, bufferStrategy);
View Full Code Here

TOP

Related Classes of net.sourceforge.fullsync.fs.FileSystem

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.