Package com.ceph.fs

Examples of com.ceph.fs.CephStat


  /** {@inheritDocs} */
  @Override
  public void setTimes(Path path, long mtime, long atime) throws IOException {
    path = makeAbsolute(path);

    CephStat stat = new CephStat();
    int mask = 0;

    if (mtime != -1) {
      mask |= CephMount.SETATTR_MTIME;
      stat.m_time = mtime;
View Full Code Here


    path = makeAbsolute(path);

    Path parent = path.getParent();

    if (parent != null) {
      CephStat stat = new CephStat();
      ceph.lstat(parent, stat); // handles FileNotFoundException case
      if (stat.isFile())
        throw new FileAlreadyExistsException(parent.toString());
    }

    return this.create(path, permission, overwrite,
        bufferSize, replication, blockSize, progress);
View Full Code Here

  public boolean rename(Path src, Path dst) throws IOException {
    src = makeAbsolute(src);
    dst = makeAbsolute(dst);

    try {
      CephStat stat = new CephStat();
      ceph.lstat(dst, stat);
      if (stat.isDir())
        return rename(src, new Path(dst, src.getName()));
      return false;
    } catch (FileNotFoundException e) {}

    try {
View Full Code Here

TOP

Related Classes of com.ceph.fs.CephStat

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.