Example #1
0
 public OpenFileEventArgs(VirtualRawPath virtualRawPath, IntPtr handle, 
     FileAccess fileAccess)
     : base(virtualRawPath)
 {
     _handle = handle;
       _fileAccess = fileAccess;
 }
 public OpenFileEventArgs(VirtualRawPath virtualRawPath, IntPtr handle,
                          FileAccess fileAccess) :
     base(virtualRawPath)
 {
     _handle     = handle;
     _fileAccess = fileAccess;
 }
 private static string GetHandlerName(VirtualRawPath path)
 {
     if (path.Segments.Length > 0) {
     return path.Segments[0];
       } else {
     return null;
       }
 }
 public ReadFileEventArgs(VirtualRawPath virtualRawPath, byte[] buffer,
                          long offset, IntPtr handle) :
     base(virtualRawPath)
 {
     _buffer = buffer;
     _offset = offset;
     _handle = handle;
 }
Example #5
0
 public VirtualPath CreateVirtualPath(VirtualRawPath vrp, FilesysOp op)
 {
     if (op == FilesysOp.Read) {
     return new VirtualMetaPath(vrp);
       } else {
     return new VirtualPath(vrp);
       }
 }
        /// <summary>
        /// Gets the path extended attribute. Reads the meta directory.
        /// </summary>
        /// <param name="path">The path.</param>
        /// <param name="name">The name.</param>
        /// <param name="value">The value.</param>
        /// <param name="bytesWritten">The bytes written.</param>
        public override Errno GetPathExtendedAttribute(string path, string name,
                                                       byte[] value, out int bytesWritten)
        {
            var vrp = new VirtualRawPath(path);

            return(base.GetPathExtendedAttribute(_pathFactory.CreateVirtualPath(
                                                     vrp, PathFactory.FilesysOp.Read).PathString, name, value,
                                                 out bytesWritten));
        }
 private static string GetHandlerName(VirtualRawPath path)
 {
     if (path.Segments.Length > 0)
     {
         return(path.Segments[0]);
     }
     else
     {
         return(null);
     }
 }
Example #8
0
 public VirtualPath CreateVirtualPath(VirtualRawPath vrp, FilesysOp op)
 {
     if (op == FilesysOp.Read)
     {
         return(new VirtualMetaPath(vrp));
     }
     else
     {
         return(new VirtualPath(vrp));
     }
 }
        public override Errno GetPathStatus(string path, out Stat buf)
        {
            // Read the meta folder.
            var vrp = new VirtualRawPath(path);
            var ret = base.GetPathStatus(
                _pathFactory.CreateVirtualPath4Read(vrp), out buf);

            if ((buf.st_mode & FilePermissions.S_IFREG) != 0)
            {
                // Make a change to file size if is a file (S_IFREG)
                buf.st_size = _fileManager.GetFileLength(new VirtualPath(vrp));
            }
            return(ret);
        }
Example #10
0
 public string CreateVirtualPath4Read(VirtualRawPath vrp)
 {
     return(CreateVirtualPath(vrp, FilesysOp.Read).PathString);
 }
Example #11
0
 public string CreateVirtualPath4Write(VirtualRawPath vrp)
 {
     return(CreateVirtualPath(vrp, FilesysOp.Write).PathString);
 }
Example #12
0
        public override Errno GetPathStatus(string path, out Stat buf)
        {
            // Read the meta folder.
              var vrp = new VirtualRawPath(path);
              var ret = base.GetPathStatus(
            _pathFactory.CreateVirtualPath4Read(vrp), out buf);

              if ((buf.st_mode & FilePermissions.S_IFREG) != 0) {
            // Make a change to file size if is a file (S_IFREG)
            buf.st_size = _fileManager.GetFileLength(new VirtualPath(vrp));
              }
              return ret;
        }
 public ReleaseFileEventArgs(VirtualRawPath virtualRawPath, IntPtr handle) :
     base(virtualRawPath)
 {
     _handle = handle;
 }
 public GetPathStatusEventArgs(VirtualRawPath virtualRawPath) :
     base(virtualRawPath)
 {
 }
Example #15
0
 /// <summary>
 /// Gets the path extended attribute. Reads the meta directory.
 /// </summary>
 /// <param name="path">The path.</param>
 /// <param name="name">The name.</param>
 /// <param name="value">The value.</param>
 /// <param name="bytesWritten">The bytes written.</param>
 public override Errno GetPathExtendedAttribute(string path, string name, 
     byte[] value, out int bytesWritten)
 {
     var vrp = new VirtualRawPath(path);
       return base.GetPathExtendedAttribute(_pathFactory.CreateVirtualPath(
     vrp, PathFactory.FilesysOp.Read).PathString, name, value,
     out bytesWritten);
 }
Example #16
0
 public FilesysEventArgs(VirtualRawPath virtualRawPath)
 {
     _virtualRawPath = virtualRawPath;
 }
Example #17
0
 public GetPathStatusEventArgs(VirtualRawPath virtualRawPath)
     : base(virtualRawPath)
 {
 }
Example #18
0
 public ReadFileEventArgs(VirtualRawPath virtualRawPath, byte[] buffer, 
     long offset, IntPtr handle)
     : base(virtualRawPath)
 {
     _buffer = buffer;
       _offset = offset;
       _handle = handle;
 }
Example #19
0
 public ReleaseFileEventArgs(VirtualRawPath virtualRawPath, IntPtr handle)
     : base(virtualRawPath)
 {
     _handle = handle;
 }
Example #20
0
 public VirtualMetaPath(VirtualRawPath vrp)
     : base(string.Format(PrefixMetaDir(TrimRawPathArgs(vrp.PathString))))
 {
 }
Example #21
0
 public VirtualMetaPath(VirtualRawPath vrp)
     : base(string.Format(PrefixMetaDir(TrimRawPathArgs(vrp.PathString))))
 {
 }
 public FilesysEventArgs(VirtualRawPath virtualRawPath)
 {
     _virtualRawPath = virtualRawPath;
 }
Example #23
0
 public string CreateVirtualPath4Write(VirtualRawPath vrp)
 {
     return CreateVirtualPath(vrp, FilesysOp.Write).PathString;
 }
Example #24
0
 public string CreateVirtualPath4Read(VirtualRawPath vrp)
 {
     return CreateVirtualPath(vrp, FilesysOp.Read).PathString;
 }
Example #25
0
 public VirtualPath(VirtualRawPath vrp)
     : base(TrimRawPathArgs(vrp.PathString))
 {
 }
Example #26
0
 public VirtualPath(VirtualRawPath vrp)
     : base(TrimRawPathArgs(vrp.PathString))
 {
 }