This class is system dependent ... must reify the vfs

Introduced properties

private fun atime: Int

core :: NativeFileStat :: atime

Returns the last access time
private fun ctime: Int

core :: NativeFileStat :: ctime

Returns the last status change time
private fun is_blk: Bool

core :: NativeFileStat :: is_blk

Returns true if it is a block device
private fun is_chr: Bool

core :: NativeFileStat :: is_chr

Returns true if it is a character device
private fun is_dir: Bool

core :: NativeFileStat :: is_dir

Returns true if it is a directory
private fun is_fifo: Bool

core :: NativeFileStat :: is_fifo

Returns true if the type is fifo
private fun is_lnk: Bool

core :: NativeFileStat :: is_lnk

Returns true if the type is a link
private fun is_reg: Bool

core :: NativeFileStat :: is_reg

Returns true if it is a regular file (not a device file, pipe, sockect, ...)
private fun is_sock: Bool

core :: NativeFileStat :: is_sock

Returns true if the type is a socket
private fun mode: Int

core :: NativeFileStat :: mode

Returns the permission bits of file
private fun mtime: Int

core :: NativeFileStat :: mtime

Returns the last modification time
private fun size: Int

core :: NativeFileStat :: size

Returns the size

Redefined properties

redef type SELF: NativeFileStat

core $ NativeFileStat :: SELF

Type of this instance, automatically specialized in every class

All properties

fun !=(other: nullable Object): Bool

core :: Object :: !=

Have self and other different values?
fun ==(other: nullable Object): Bool

core :: Object :: ==

Have self and other the same value?
type CLASS: Class[SELF]

core :: Object :: CLASS

The type of the class of self.
type SELF: Object

core :: Object :: SELF

Type of this instance, automatically specialized in every class
fun address_is_null: Bool

core :: Pointer :: address_is_null

Is the address behind this Object at NULL?
private fun atime: Int

core :: NativeFileStat :: atime

Returns the last access time
protected fun class_factory(name: String): CLASS

core :: Object :: class_factory

Implementation used by get_class to create the specific class.
fun class_name: String

core :: Object :: class_name

The class name of the object.
private fun ctime: Int

core :: NativeFileStat :: ctime

Returns the last status change time
fun free

core :: Pointer :: free

Free the memory pointed by this pointer
fun get_class: CLASS

core :: Object :: get_class

The meta-object representing the dynamic type of self.
fun hash: Int

core :: Object :: hash

The hash code of the object.
init init

core :: Object :: init

fun inspect: String

core :: Object :: inspect

Developer readable representation of self.
protected fun inspect_head: String

core :: Object :: inspect_head

Return "CLASSNAME:#OBJECTID".
private fun is_blk: Bool

core :: NativeFileStat :: is_blk

Returns true if it is a block device
private fun is_chr: Bool

core :: NativeFileStat :: is_chr

Returns true if it is a character device
private fun is_dir: Bool

core :: NativeFileStat :: is_dir

Returns true if it is a directory
private fun is_fifo: Bool

core :: NativeFileStat :: is_fifo

Returns true if the type is fifo
private fun is_lnk: Bool

core :: NativeFileStat :: is_lnk

Returns true if the type is a link
private fun is_reg: Bool

core :: NativeFileStat :: is_reg

Returns true if it is a regular file (not a device file, pipe, sockect, ...)
intern fun is_same_instance(other: nullable Object): Bool

core :: Object :: is_same_instance

Return true if self and other are the same instance (i.e. same identity).
fun is_same_serialized(other: nullable Object): Bool

core :: Object :: is_same_serialized

Is self the same as other in a serialization context?
intern fun is_same_type(other: Object): Bool

core :: Object :: is_same_type

Return true if self and other have the same dynamic type.
private fun is_sock: Bool

core :: NativeFileStat :: is_sock

Returns true if the type is a socket
private fun mode: Int

core :: NativeFileStat :: mode

Returns the permission bits of file
private fun mtime: Int

core :: NativeFileStat :: mtime

Returns the last modification time
private intern fun native_class_name: CString

core :: Object :: native_class_name

The class name of the object in CString format.
private fun native_equals(o: Pointer): Bool

core :: Pointer :: native_equals

init nul: Pointer

core :: Pointer :: nul

C NULL pointer
intern fun object_id: Int

core :: Object :: object_id

An internal hash code for the object based on its identity.
fun output

core :: Object :: output

Display self on stdout (debug only).
intern fun output_class_name

core :: Object :: output_class_name

Display class name on stdout (debug only).
private fun premultiply_alpha(width: Int, height: Int)

core :: Pointer :: premultiply_alpha

Multiply RGB values by their alpha value
fun serialization_hash: Int

core :: Object :: serialization_hash

Hash value use for serialization
private fun size: Int

core :: NativeFileStat :: size

Returns the size
intern fun sys: Sys

core :: Object :: sys

Return the global sys object, the only instance of the Sys class.
abstract fun to_jvalue(env: JniEnv): JValue

core :: Object :: to_jvalue

fun to_s: String

core :: Object :: to_s

User readable representation of self.
package_diagram core::file::NativeFileStat NativeFileStat core::Pointer Pointer core::file::NativeFileStat->core::Pointer core::Object Object core::Pointer->core::Object ...core::Object ... ...core::Object->core::Object

Ancestors

interface Object

core :: Object

The root of the class hierarchy.

Parents

extern class Pointer

core :: Pointer

Pointer classes are used to manipulate extern C structures.

Class definitions

core $ NativeFileStat
# 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