Property definitions

core $ NativeFileStat :: defaultinit
# This class is system dependent ... must reify the vfs
private extern class NativeFileStat `{ struct stat * `}

	# Returns the permission bits of file
	fun mode: Int `{ return self->st_mode; `}

	# Returns the last access time
	fun atime: Int `{ return self->st_atime; `}

	# Returns the last status change time
	fun ctime: Int `{ return self->st_ctime; `}

	# Returns the last modification time
	fun mtime: Int `{ return self->st_mtime; `}

	# Returns the size
	fun size: Int `{ return self->st_size; `}

	# Returns true if it is a regular file (not a device file, pipe, sockect, ...)
	fun is_reg: Bool `{ return S_ISREG(self->st_mode); `}

	# Returns true if it is a directory
	fun is_dir: Bool `{ return S_ISDIR(self->st_mode); `}

	# Returns true if it is a character device
	fun is_chr: Bool `{ return S_ISCHR(self->st_mode); `}

	# Returns true if it is a block device
	fun is_blk: Bool `{ return S_ISBLK(self->st_mode); `}

	# Returns true if the type is fifo
	fun is_fifo: Bool `{ return S_ISFIFO(self->st_mode); `}

	# Returns true if the type is a link
	fun is_lnk: Bool `{
#ifdef _WIN32
	return 0;
#else
	return S_ISLNK(self->st_mode);
#endif
	`}

	# Returns true if the type is a socket
	fun is_sock: Bool `{
#ifdef _WIN32
	return 0;
#else
	return S_ISSOCK(self->st_mode);
#endif
	`}
end
lib/core/file.nit:1462,1--1512,3