Package net.sourceforge.fullsync.fs

Examples of net.sourceforge.fullsync.fs.File


    }
    super.dispose();
  }

  protected void drawSide(GC g, Task t, Action a, int location) {
    File n;
    if (t == null) {
      n = null;
    }
    else if (location == Location.Source) {
      n = t.getSource();
    }
    else {
      n = t.getDestination();
    }

    int x = location == Location.Source ? 2 : (2 * 16) + 2;

    if (n == null) {
      g.drawImage(nodeUndefined, x, 0);
    }
    else if (n.exists()) {
      if (n.isDirectory()) {
        g.drawImage(nodeDirectory, x, 0);
      }
      else {
        g.drawImage(nodeFile, x, 0);
      }
View Full Code Here


    // using 5 bits for files
    if (t == null) {
      hash |= 1;
    }
    else {
      File src = t.getSource();
      File dst = t.getDestination();
      if (src.exists()) {
        hash |= 2;
        if (src.isDirectory()) {
          hash |= 4;
        }
      }
      if (dst.exists()) {
        hash |= 8;
        if (dst.isDirectory()) {
          hash |= 16;
        }
      }
    }
View Full Code Here

    this.size = size;
  }

  @Override
  public File createChild(final String name, final boolean directory) throws IOException {
    File f = getConnection().createChild(this, name, directory);
    children.put(name, f);
    return f;
  }
View Full Code Here

    refreshReference();
  }

  @Override
  public void refreshBuffer() throws IOException {
    File unb = getUnbuffered();
    directory = unb.isDirectory();
    exists = unb.exists();

    if (exists && !directory) {
      setFsLastModified(unb.getLastModified());
      setFsSize(unb.getSize());
    }
  }
View Full Code Here

TOP

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

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.