public static Int32 FromAccessModes (AccessModes value)
		{
			Int32 rval;
			if (FromAccessModes (value, out rval) == -1)
				ThrowArgumentException (value);
			return rval;
		}
 public FieldAttribute(string FieldName, bool IsKey, AccessModes AccessMode, bool IsOptional)
 {
     this.FieldName = FieldName;
     this.IsKey = IsKey;
     this.AccessMode = AccessMode;
     this.IsOptional = IsOptional;
 }
Example #3
0
 protected override Errno OnAccessPath(string path, AccessModes mask)
 {
     int r = Syscall.access (basedir+path, mask);
     if (r == -1)
         return Stdlib.GetLastError ();
     return 0;
 }
Example #4
0
 public virtual Errno AccessPath(string path, AccessModes mask)
 {
     int r = Syscall.access (basedir+path, mask);
       if (r == -1)
     return Stdlib.GetLastError ();
       return 0;
 }
Example #5
0
 protected override Errno OnAccessPath(string path, AccessModes mask)
 {
     return 0;
     //			var realPath = GetRealPath(path);
     //			int r = Syscall.access(realPath, mask);
     //			if (r == -1)
     //			{
     //				return Stdlib.GetLastError();
     //			}
     //			return 0;
 }
 public bool HasAccess(AccessModes mode)
 {
     return ((this.AccessMode & mode) == mode);
 }
		private static int FromAccessModes (AccessModes value, out Int32 rval)
		{
			throw new System.NotImplementedException();
		}
Example #8
0
 public override Errno AccessPath(string path, AccessModes mask)
 {
     String readPath = _pathFactory.CreateVirtualPath4Read(new VirtualRawPath(path));
       return base.AccessPath(readPath, mask);
 }
		private static extern int ToAccessModes (Int32 value, out AccessModes rval);
		public static bool TryToAccessModes (Int32 value, out AccessModes rval)
		{
			return ToAccessModes (value, out rval) == 0;
		}
		public static bool TryFromAccessModes (AccessModes value, out Int32 rval)
		{
			return FromAccessModes (value, out rval) == 0;
		}
		private static int ToAccessModes (Int32 value, out AccessModes rval)
		{
			throw new System.NotImplementedException();
		}
Example #13
0
        protected override Errno OnAccessPath(string path, AccessModes mask)
        {
            Logger.WriteLineIf(LogLevel.Verbose, _fslog_props, string.Format("OnAccessPath, path={0}, mask={1}", path, mask));

              return this._rfs.AccessPath(path, mask);
        }
		private static extern int FromAccessModes (AccessModes value, out Int32 rval);
Example #15
0
 protected override Errno OnAccessPath(string path, AccessModes mode)
 {
     if ((mode & AccessModes.W_OK) != 0)
         return Errno.EROFS;
     try
     {
         Entry fsEntry = walker.SearchEntry(path.Substring(1));
         if (fsEntry == null)
             return Errno.ENOENT;
         if (((mode & AccessModes.X_OK) != 0) && (fsEntry.Kind == EntryKind.ZipFileEntry))
             return Errno.EACCES;
     }
     catch (DirectoryNotFoundException)
     {
         return Errno.ENOTDIR;
     }
     catch (IOException)
     {
         return Errno.EIO;
     }
     return 0;
 }
Example #16
0
 internal static extern int access(string path, AccessModes amode);
Example #17
0
 public FieldAttribute(string FieldName, AccessModes AccessMode, bool IsOptional)
     : this(FieldName, false, AccessMode, IsOptional) { }
Example #18
0
 public FieldAttribute(string FieldName, bool IsKey, AccessModes AccessMode)
     : this(FieldName, IsKey, AccessMode, false) { }
Example #19
0
 public FieldAttribute(string FieldName, AccessModes AccessMode)
     : this(FieldName, false, AccessMode) { }