Examples of FuseStat


Examples of fuse.compat.FuseStat

   //
   // create initial FuseStat structure (called from Node's constructor)

   protected FuseStat createStat()
   {
      FuseStat stat = new FuseStat();

      stat.mode = FuseFtype.TYPE_FILE | 0444;
      stat.uid = stat.gid = 0;
      stat.ctime = stat.mtime = stat.atime = (int)(System.currentTimeMillis() / 1000L);
      stat.size = 0;
View Full Code Here

Examples of fuse.compat.FuseStat

   }

   public synchronized void setContent(byte[] content)
   {
      // stat is by declaration read-only - we must create a copy before modifying it's attributes
      FuseStat stat = (FuseStat) super.getStat().clone();

      if (this.content == null)
         stat.ctime = (int)(System.currentTimeMillis() / 1000L);

      this.content = content;
View Full Code Here

Examples of fuse.compat.FuseStat

    }

    //
    // create initial FuseStat structure (called from Node's constructor)
    protected FuseStat createStat() {
        FuseStat stat = new FuseStat();

        stat.mode = FuseFtype.TYPE_DIR | FILE_PERMS;
        stat.uid = stat.gid = 0;
        stat.ctime = stat.mtime = stat.atime = (int) (System.currentTimeMillis() / 1000L);
        stat.size = 0;
View Full Code Here

Examples of fuse.compat.FuseStat

    public synchronized Node addChild(Node node) {
        Node previousNode = children.put(node.getName(), node);
        node.setParent(this);

        FuseStat stat = (FuseStat) getStat().clone();
        stat.mtime = stat.atime = (int) (System.currentTimeMillis() / 1000L);
        setStat(stat);

        if (previousNode != null) {
            previousNode.setParent(null);
View Full Code Here

Examples of fuse.compat.FuseStat

    public synchronized Node removeChild(String name) {
        Node removedNode = children.remove(name);

        if (removedNode != null) {
            FuseStat stat = (FuseStat) getStat().clone();
            stat.mtime = stat.atime = (int) (System.currentTimeMillis() / 1000L);
            setStat(stat);

            removedNode.setParent(null);
        }
View Full Code Here

Examples of fuse.compat.FuseStat

      Node node = tree.lookupNode(path);
      ZipEntry entry = null;
      if (node == null || (entry = (ZipEntry)node.getValue()) == null)
         throw new FuseException("No Such Entry").initErrno(FuseException.ENOENT);

      FuseStat stat = new FuseStat();

      stat.mode = entry.isDirectory() ? FuseFtype.TYPE_DIR | 0755 : FuseFtype.TYPE_FILE | 0644;
      stat.nlink = 1;
      stat.uid = 0;
      stat.gid = 0;
View Full Code Here

Examples of fuse.compat.FuseStat

      Node[] children = ((DirectoryNode) rr.node).getChildren();
      FuseDirEnt[] dirEntries = new FuseDirEnt[children.length];
      for (int i = 0; i < children.length; i++)
      {
         Node child = children[i];
         FuseStat stat = (child instanceof MountpointNode)
            ? ((MountpointNode) child).getFilesystem().getattr("/")
            : child.getStat();
         FuseDirEnt dirEntry = new FuseDirEnt();
         dirEntry.name = child.getName();
         dirEntry.mode = stat.mode;
View Full Code Here

Examples of fuse.compat.FuseStat

   //
   // create initial FuseStat structure (called from Node's constructor)

   protected FuseStat createStat()
   {
      FuseStat stat = new FuseStat();

      stat.mode = FuseFtype.TYPE_SYMLINK | 0777;
      stat.uid = stat.gid = 0;
      stat.ctime = stat.mtime = stat.atime = (int)(System.currentTimeMillis() / 1000L);
      stat.size = 0;
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.