Examples of KfsFileAttr


Examples of com.quantcast.qfs.access.KfsFileAttr

      }
    }
  }

  public FileStatus stat(Path path) throws IOException {
    final KfsFileAttr fa  = new KfsFileAttr();
    final String      pn  = path.toUri().getPath();
    kfsAccess.kfs_retToIOException(kfsAccess.kfs_stat(pn, fa), pn);
    return new FileStatus(
      fa.isDirectory ? 0L : fa.filesize,
      fa.isDirectory,
View Full Code Here

Examples of com.quantcast.qfs.access.KfsFileAttr

      path
    );
  }

  public KfsFileAttr fullStat(Path path) throws IOException {
    final KfsFileAttr fa  = new KfsFileAttr();
    final String      pn  = path.toUri().getPath();
    kfsAccess.kfs_retToIOException(kfsAccess.kfs_stat(pn, fa), pn);
    return fa;
  }
View Full Code Here

Examples of com.quantcast.qfs.access.KfsFileAttr

    return localFS.getFileStatus(new Path(path.toUri().getPath()));
  }

  public KfsFileAttr fullStat(Path path) throws IOException {
    FileStatus fs = localFS.getFileStatus(new Path(path.toUri().getPath()));
    KfsFileAttr fa = new KfsFileAttr();
    fa.filename = fs.getPath().toUri().getPath();
    fa.isDirectory = fs.isDir();
    fa.filesize = fs.getLen();
    fa.replication = fs.getReplication();
    fa.modificationTime = fs.getModificationTime();
View Full Code Here

Examples of com.quantcast.qfs.access.KfsFileAttr

  // recursively delete the directory and its contents
  public boolean delete(Path path, boolean recursive) throws IOException {
    final Path absolute = makeAbsolute(path);
    try {
      final KfsFileAttr fa   = qfsImpl.fullStat(absolute);
      final String      srep = absolute.toUri().getPath();
      if (! fa.isDirectory) {
        return qfsImpl.remove(srep) == 0;
      }
      if (recursive) {
View Full Code Here

Examples of com.quantcast.qfs.access.KfsFileAttr

  public ContentSummary getContentSummary(Path path) throws IOException {
    // since QFS stores sizes at each level of the dir tree, we can
    // just stat the dir.
    final Path absolute = makeAbsolute(path);
    final KfsFileAttr stat = qfsImpl.fullStat(absolute);
    if (stat.isDirectory) {
      final long len = stat.filesize;
      if (len < 0) {
        return getContentSummarySuper(absolute);
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.