internal UnixFileSystemInfo (String path, Stat stat)
		{
			this.originalPath = path;
			this.fullPath = UnixPath.GetFullPath (path);
			this.stat = stat;
			this.valid = true;
		}
예제 #2
0
 internal FileStat (string path)
 {
     buf = new Stat ();
     is_directory = is_regular_file = Syscall.stat (path, out buf) == 0;
     is_regular_file &= (buf.st_mode & FilePermissions.S_IFREG) == FilePermissions.S_IFREG;
     is_directory &= (buf.st_mode & FilePermissions.S_IFDIR) == FilePermissions.S_IFDIR;
     // FIXME: workaround for http://bugzilla.ximian.com/show_bug.cgi?id=76966
     is_directory &= ! ((buf.st_mode & FilePermissions.S_IFSOCK) == FilePermissions.S_IFSOCK);
     mtime = buf.st_mtime;
 }
예제 #3
0
		internal UnixFileInfo (string path, Stat stat)
			: base (path, stat)
		{
		}
		protected override int GetFileStatus (string path, out Stat stat)
		{
			return Syscall.lstat (path, out stat);
		}
		internal UnixSymbolicLinkInfo (string path, Stat stat)
			: base (path, stat)
		{
		}
예제 #6
0
 public static DateTime GetLastStatusChangeTime(Stat stat)
 {
     return NativeConvert.ToDateTime(stat.st_ctime);
 }
예제 #7
0
 public static DateTime GetLastAccessTime(Stat stat)
 {
     return NativeConvert.ToDateTime(stat.st_atime);
 }
예제 #8
0
 public static UnixFileType GetFileType(Stat stat)
 {
     return (UnixFileType)(stat.st_mode & FilePermissions.S_IFMT);
 }
예제 #9
0
 public static long GetFileSize(Stat stat)
 {
     return stat.st_size;
 }
예제 #10
0
 public static DateTime GetLastWriteTime(Stat stat)
 {
     return NativeConvert.ToDateTime(stat.st_mtime);
 }
		protected virtual int GetFileStatus (string path, out Stat stat)
		{
			return Syscall.stat (path, out stat);
		}
예제 #12
0
		public static extern int lstat (string file_name, out Stat buf);
예제 #13
0
		public static extern int fstat (int filedes, out Stat buf);
		internal UnixDirectoryInfo (string path, Stat stat)
			: base (path, stat)
		{
		}