X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=blobdiff_plain;f=mcs%2Fclass%2FMono.Posix%2FMono.Unix%2FUnixFileSystemInfo.cs;fp=mcs%2Fclass%2FMono.Posix%2FMono.Unix%2FUnixFileSystemInfo.cs;h=bfb6c98de71f59514af594d11340ac771888eb58;hb=d56758124087ba74bbf1fc7fd3028d2af570140d;hp=1f1786e699e9e56119ef6c376b58716f670f9132;hpb=dc4509baf0001729ba2c05249f2119037f7c7e88;p=mono.git diff --git a/mcs/class/Mono.Posix/Mono.Unix/UnixFileSystemInfo.cs b/mcs/class/Mono.Posix/Mono.Unix/UnixFileSystemInfo.cs index 1f1786e699e..bfb6c98de71 100644 --- a/mcs/class/Mono.Posix/Mono.Unix/UnixFileSystemInfo.cs +++ b/mcs/class/Mono.Posix/Mono.Unix/UnixFileSystemInfo.cs @@ -88,38 +88,48 @@ namespace Mono.Unix { } } + [CLSCompliant (false)] public ulong Device { get {AssertValid (); return stat.st_dev;} } + [CLSCompliant (false)] public ulong Inode { get {AssertValid (); return stat.st_ino;} } + [CLSCompliant (false)] + [Obsolete ("The type of this property will change in the next release.")] public FilePermissions Mode { get {AssertValid (); return stat.st_mode;} } + [CLSCompliant (false)] public FilePermissions Permissions { get {AssertValid (); return stat.st_mode & ~FilePermissions.S_IFMT;} } + [CLSCompliant (false)] public FilePermissions FileType { get {AssertValid (); return stat.st_mode & FilePermissions.S_IFMT;} } + [CLSCompliant (false)] public ulong LinkCount { get {AssertValid (); return (ulong) stat.st_nlink;} } + [CLSCompliant (false)] public uint OwnerUser { get {AssertValid (); return stat.st_uid;} } + [CLSCompliant (false)] public uint OwnerGroup { get {AssertValid (); return stat.st_gid;} } + [CLSCompliant (false)] public ulong DeviceType { get {AssertValid (); return stat.st_rdev;} } @@ -205,6 +215,12 @@ namespace Mono.Unix { return (mode & type) == type; } + internal static bool IsType (Native.FilePermissions mode, Native.FilePermissions type) + { + return (mode & type) == type; + } + + [CLSCompliant (false)] public bool CanAccess (AccessMode mode) { int r = Syscall.access (FullPath, mode); @@ -227,6 +243,7 @@ namespace Mono.Unix { public abstract void Delete (); + [CLSCompliant (false)] public long GetConfigurationValue (PathConf name) { Syscall.SetLastError ((Error) 0); @@ -263,12 +280,14 @@ namespace Mono.Unix { UnixMarshal.ThrowExceptionForLastErrorIf (r); } + [CLSCompliant (false)] public void SetPermissions (FilePermissions perms) { int r = Syscall.chmod (FullPath, perms); UnixMarshal.ThrowExceptionForLastErrorIf (r); } + [CLSCompliant (false)] public virtual void SetOwner (uint owner, uint group) { int r = Syscall.chown (FullPath, owner, group);