core :: NativeFileStat :: defaultinit
core :: NativeFileStat :: is_reg
Returns true if it is a regular file (not a device file, pipe, sockect, ...)core $ NativeFileStat :: SELF
Type of this instance, automatically specialized in every classcore :: Pointer :: address_is_null
Is the address behind this Object at NULL?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Pointer :: defaultinit
core :: Object :: defaultinit
core :: NativeFileStat :: defaultinit
core :: NativeFileStat :: is_reg
Returns true if it is a regular file (not a device file, pipe, sockect, ...)core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Pointer :: native_equals
core :: Object :: output_class_name
Display class name on stdout (debug only).core :: Pointer :: premultiply_alpha
Multiply RGB values by their alpha value
# 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