Class: File::Stat
- Inherits:
-
Object
- Object
- File::Stat
- Includes:
- Comparable
- Defined in:
- file.c
Overview
Objects of class File::Stat encapsulate common status information for File objects. The information is recorded at the moment the File::Stat object is created; changes made to the file after that point will not be reflected. File::Stat objects are returned by IO#stat, File::stat, File#lstat, and File::lstat. Many of these methods return platform-specific values, and not all values are meaningful on all systems. See also Kernel#test.
Instance Method Summary (collapse)
-
- (-1, ...) <=>(other_stat)
Compares File::Stat objects by comparing their respective modification times.
-
- (Time) atime
Returns the last access time for this file as an object of class Time.
-
- (Integer?) blksize
Returns the native file system's block size.
-
- (Boolean) blockdev?
Returns true if the file is a block device, false if it isn't or if the operating system doesn't support this feature.
-
- (Integer?) blocks
Returns the number of native file system blocks allocated for this file, or nil if the operating system doesn't support this feature.
-
- (Boolean) chardev?
Returns true if the file is a character device, false if it isn't or if the operating system doesn't support this feature.
-
- (aTime) ctime
Returns the change time for stat (that is, the time directory information about the file was changed, not the file itself).
-
- (Fixnum) dev
Returns an integer representing the device on which stat resides.
-
- (Fixnum) dev_major
Returns the major part of File_Stat#dev or nil.
-
- (Fixnum) dev_minor
Returns the minor part of File_Stat#dev or nil.
-
- (Boolean) directory?(file_name)
Returns true if the named file is a directory, or a symlink that points at a directory, and false otherwise.
-
- (Boolean) executable?
Returns true if stat is executable or if the operating system doesn't distinguish executable files from nonexecutable files.
-
- (Boolean) executable_real?
Same as executable?, but tests using the real owner of the process.
-
- (Boolean) file?
Returns true if stat is a regular file (not a device file, pipe, socket, etc.).
-
- (String) ftype
Identifies the type of stat.
-
- (Fixnum) gid
Returns the numeric group id of the owner of stat.
-
- (Boolean) grpowned?
Returns true if the effective group id of the process is the same as the group id of stat.
-
- (Object) File::Stat.new(file_name)
constructor
Create a File::Stat object for the given file name (raising an exception if the file doesn't exist).
-
- (Object) initialize_copy
:nodoc:.
-
- (Fixnum) ino
Returns the inode number for stat.
-
- (String) inspect
Produce a nicely formatted description of stat.
-
- (Fixnum) mode
Returns an integer representing the permission bits of stat.
-
- (aTime) mtime
Returns the modification time of stat.
-
- (Fixnum) nlink
Returns the number of hard links to stat.
-
- (Boolean) owned?
Returns true if the effective user id of the process is the same as the owner of stat.
-
- (Boolean) pipe?
Returns true if the operating system supports pipes and stat is a pipe; false otherwise.
-
- (Fixnum?) rdev
Returns an integer representing the device type on which stat resides.
-
- (Fixnum) rdev_major
Returns the major part of File_Stat#rdev or nil.
-
- (Fixnum) rdev_minor
Returns the minor part of File_Stat#rdev or nil.
-
- (Boolean) readable?
Returns true if stat is readable by the effective user id of this process.
-
- (Boolean) readable_real?
Returns true if stat is readable by the real user id of this process.
-
- (Boolean) setgid?
Returns true if stat has the set-group-id permission bit set, false if it doesn't or if the operating system doesn't support this feature.
-
- (Boolean) setuid?
Returns true if stat has the set-user-id permission bit set, false if it doesn't or if the operating system doesn't support this feature.
-
- (Fixnum) size
Returns the size of stat in bytes.
-
- (Integer) size
Returns the size of stat in bytes.
-
- (Boolean) socket?
Returns true if stat is a socket, false if it isn't or if the operating system doesn't support this feature.
-
- (Boolean) sticky?
Returns true if stat has its sticky bit set, false if it doesn't or if the operating system doesn't support this feature.
-
- (Boolean) symlink?
Returns true if stat is a symbolic link, false if it isn't or if the operating system doesn't support this feature.
-
- (Fixnum) uid
Returns the numeric user id of the owner of stat.
-
- (Fixnum?) world_readable?
If stat is readable by others, returns an integer representing the file permission bits of stat.
-
- (Fixnum?) world_writable?
If stat is writable by others, returns an integer representing the file permission bits of stat.
-
- (Boolean) writable?
Returns true if stat is writable by the effective user id of this process.
-
- (Boolean) writable_real?
Returns true if stat is writable by the real user id of this process.
-
- (Boolean) zero?
Returns true if stat is a zero-length file; false otherwise.
Methods included from Comparable
#<, #<=, #==, #>, #>=, #between?
Constructor Details
- (Object) File::Stat.new(file_name)
Create a File::Stat object for the given file name (raising an exception if the file doesn't exist).
|
|
# File 'file.c'
static VALUE
rb_stat_init(VALUE obj, VALUE fname)
{
struct stat st, *nst;
rb_secure(2);
FilePathValue(fname);
fname = rb_str_encode_ospath(fname);
if (STAT(StringValueCStr(fname), &st) == -1) {
rb_sys_fail_path(fname);
}
|
Instance Method Details
- (-1, ...) <=>(other_stat)
Compares File::Stat objects by comparing their respective modification times.
f1 = File.new("f1", "w")
sleep 1
f2 = File.new("f2", "w")
f1.stat <=> f2.stat #=> -1
|
|
# File 'file.c'
static VALUE
rb_stat_cmp(VALUE self, VALUE other)
{
if (rb_obj_is_kind_of(other, rb_obj_class(self))) {
struct timespec ts1 = stat_mtimespec(get_stat(self));
struct timespec ts2 = stat_mtimespec(get_stat(other));
if (ts1.tv_sec == ts2.tv_sec) {
if (ts1.tv_nsec == ts2.tv_nsec) return INT2FIX(0);
if (ts1.tv_nsec < ts2.tv_nsec) return INT2FIX(-1);
return INT2FIX(1);
}
|
- (Time) atime
Returns the last access time for this file as an object of class Time.
File.stat("testfile").atime #=> Wed Dec 31 18:00:00 CST 1969
|
|
# File 'file.c'
static VALUE
rb_stat_atime(VALUE self)
{
return stat_atime(get_stat(self));
}
|
- (Integer?) blksize
Returns the native file system's block size. Will return nil on platforms that don't support this information.
File.stat("testfile").blksize #=> 4096
|
|
# File 'file.c'
static VALUE
rb_stat_blksize(VALUE self)
{
#ifdef HAVE_ST_BLKSIZE
return ULONG2NUM(get_stat(self)->st_blksize);
#else
return Qnil;
#endif
}
|
- (Boolean) blockdev?
Returns true if the file is a block device, false if it isn't or if the operating system doesn't support this feature.
File.stat("testfile").blockdev? #=> false
File.stat("/dev/hda1").blockdev? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_b(VALUE obj)
{
#ifdef S_ISBLK
if (S_ISBLK(get_stat(obj)->st_mode)) return Qtrue;
#endif
return Qfalse;
}
|
- (Integer?) blocks
Returns the number of native file system blocks allocated for this file, or nil if the operating system doesn't support this feature.
File.stat("testfile").blocks #=> 2
|
|
# File 'file.c'
static VALUE
rb_stat_blocks(VALUE self)
{
#ifdef HAVE_STRUCT_STAT_ST_BLOCKS
# if SIZEOF_STRUCT_STAT_ST_BLOCKS > SIZEOF_LONG
return ULL2NUM(get_stat(self)->st_blocks);
# else
return ULONG2NUM(get_stat(self)->st_blocks);
# endif
#else
return Qnil;
#endif
}
|
- (Boolean) chardev?
Returns true if the file is a character device, false if it isn't or if the operating system doesn't support this feature.
File.stat("/dev/tty").chardev? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_c(VALUE obj)
{
if (S_ISCHR(get_stat(obj)->st_mode)) return Qtrue;
return Qfalse;
}
|
- (aTime) ctime
Returns the change time for stat (that is, the time directory information about the file was changed, not the file itself).
Note that on Windows (NTFS), returns creation time (birth time).
File.stat("testfile").ctime #=> Wed Apr 09 08:53:14 CDT 2003
|
|
# File 'file.c'
static VALUE
rb_stat_ctime(VALUE self)
{
return stat_ctime(get_stat(self));
}
|
- (Fixnum) dev
Returns an integer representing the device on which stat resides.
File.stat("testfile").dev #=> 774
|
|
# File 'file.c'
static VALUE
rb_stat_dev(VALUE self)
{
return DEVT2NUM(get_stat(self)->st_dev);
}
|
- (Fixnum) dev_major
Returns the major part of File_Stat#dev or nil.
File.stat("/dev/fd1").dev_major #=> 2
File.stat("/dev/tty").dev_major #=> 5
|
|
# File 'file.c'
static VALUE
rb_stat_dev_major(VALUE self)
{
#if defined(major)
return INT2NUM(major(get_stat(self)->st_dev));
#else
return Qnil;
#endif
}
|
- (Fixnum) dev_minor
Returns the minor part of File_Stat#dev or nil.
File.stat("/dev/fd1").dev_minor #=> 1
File.stat("/dev/tty").dev_minor #=> 0
|
|
# File 'file.c'
static VALUE
rb_stat_dev_minor(VALUE self)
{
#if defined(minor)
return INT2NUM(minor(get_stat(self)->st_dev));
#else
return Qnil;
#endif
}
|
- (Boolean) directory?(file_name)
Returns true if the named file is a directory, or a symlink that points at a directory, and false otherwise.
File.directory?(".")
|
|
# File 'file.c'
/*
* call-seq:
* stat.directory? -> true or false
*
* Returns <code>true</code> if <i>stat</i> is a directory,
* <code>false</code> otherwise.
*
* File.stat("testfile").directory? #=> false
* File.stat(".").directory? #=> true
*/
static VALUE
rb_stat_d(VALUE obj)
{
if (S_ISDIR(get_stat(obj)->st_mode)) return Qtrue;
return Qfalse;
}
|
- (Boolean) executable?
Returns true if stat is executable or if the operating system doesn't distinguish executable files from nonexecutable files. The tests are made using the effective owner of the process.
File.stat("testfile").executable? #=> false
|
|
# File 'file.c'
static VALUE
rb_stat_x(VALUE obj)
{
struct stat *st = get_stat(obj);
#ifdef USE_GETEUID
if (geteuid() == 0) {
return st->st_mode & S_IXUGO ? Qtrue : Qfalse;
}
|
- (Boolean) executable_real?
Same as executable?, but tests using the real owner of the process.
|
|
# File 'file.c'
static VALUE
rb_stat_X(VALUE obj)
{
struct stat *st = get_stat(obj);
#ifdef USE_GETEUID
if (getuid() == 0) {
return st->st_mode & S_IXUGO ? Qtrue : Qfalse;
}
|
- (Boolean) file?
Returns true if stat is a regular file (not a device file, pipe, socket, etc.).
File.stat("testfile").file? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_f(VALUE obj)
{
if (S_ISREG(get_stat(obj)->st_mode)) return Qtrue;
return Qfalse;
}
|
- (String) ftype
Identifies the type of stat. The return string is one of: "file", "directory", "characterSpecial", "blockSpecial", "fifo", "link", "socket", or "unknown".
File.stat("/dev/tty").ftype #=> "characterSpecial"
|
|
# File 'file.c'
static VALUE
rb_stat_ftype(VALUE obj)
{
return rb_file_ftype(get_stat(obj));
}
|
- (Fixnum) gid
Returns the numeric group id of the owner of stat.
File.stat("testfile").gid #=> 500
|
|
# File 'file.c'
static VALUE
rb_stat_gid(VALUE self)
{
return GIDT2NUM(get_stat(self)->st_gid);
}
|
- (Boolean) grpowned?
Returns true if the effective group id of the process is the same as the group id of stat. On Windows NT, returns false.
File.stat("testfile").grpowned? #=> true
File.stat("/etc/passwd").grpowned? #=> false
|
|
# File 'file.c'
static VALUE
rb_stat_grpowned(VALUE obj)
{
#ifndef _WIN32
if (rb_group_member(get_stat(obj)->st_gid)) return Qtrue;
#endif
return Qfalse;
}
|
- (Object) initialize_copy
:nodoc:
|
|
# File 'file.c'
static VALUE
rb_stat_init_copy(VALUE copy, VALUE orig)
{
struct stat *nst;
if (copy == orig) return orig;
rb_check_frozen(copy);
/* need better argument type check */
if (!rb_obj_is_instance_of(orig, rb_obj_class(copy))) {
rb_raise(rb_eTypeError, "wrong argument class");
}
|
- (Fixnum) ino
Returns the inode number for stat.
File.stat("testfile").ino #=> 1083669
|
|
# File 'file.c'
static VALUE
rb_stat_ino(VALUE self)
{
#if SIZEOF_STRUCT_STAT_ST_INO > SIZEOF_LONG
return ULL2NUM(get_stat(self)->st_ino);
#else
return ULONG2NUM(get_stat(self)->st_ino);
#endif
}
|
- (String) inspect
Produce a nicely formatted description of stat.
File.stat("/etc/passwd").inspect
#=> "#<File::Stat dev=0xe000005, ino=1078078, mode=0100644,
# nlink=1, uid=0, gid=0, rdev=0x0, size=1374, blksize=4096,
# blocks=8, atime=Wed Dec 10 10:16:12 CST 2003,
# mtime=Fri Sep 12 15:41:41 CDT 2003,
# ctime=Mon Oct 27 11:20:27 CST 2003>"
|
|
# File 'file.c'
static VALUE
rb_stat_inspect(VALUE self)
{
VALUE str;
size_t i;
static const struct {
const char *name;
VALUE (*func)(VALUE);
}
|
- (Fixnum) mode
Returns an integer representing the permission bits of stat. The meaning of the bits is platform dependent; on Unix systems, see stat(2).
File.chmod(0644, "testfile") #=> 1
s = File.stat("testfile")
sprintf("%o", s.mode) #=> "100644"
|
|
# File 'file.c'
static VALUE
rb_stat_mode(VALUE self)
{
return UINT2NUM(ST2UINT(get_stat(self)->st_mode));
}
|
- (aTime) mtime
Returns the modification time of stat.
File.stat("testfile").mtime #=> Wed Apr 09 08:53:14 CDT 2003
|
|
# File 'file.c'
static VALUE
rb_stat_mtime(VALUE self)
{
return stat_mtime(get_stat(self));
}
|
- (Fixnum) nlink
Returns the number of hard links to stat.
File.stat("testfile").nlink #=> 1
File.link("testfile", "testfile.bak") #=> 0
File.stat("testfile").nlink #=> 2
|
|
# File 'file.c'
static VALUE
rb_stat_nlink(VALUE self)
{
return UINT2NUM(get_stat(self)->st_nlink);
}
|
- (Boolean) owned?
Returns true if the effective user id of the process is the same as the owner of stat.
File.stat("testfile").owned? #=> true
File.stat("/etc/passwd").owned? #=> false
|
|
# File 'file.c'
static VALUE
rb_stat_owned(VALUE obj)
{
if (get_stat(obj)->st_uid == geteuid()) return Qtrue;
return Qfalse;
}
|
- (Boolean) pipe?
Returns true if the operating system supports pipes and stat is a pipe; false otherwise.
|
|
# File 'file.c'
static VALUE
rb_stat_p(VALUE obj)
{
#ifdef S_IFIFO
if (S_ISFIFO(get_stat(obj)->st_mode)) return Qtrue;
#endif
return Qfalse;
}
|
- (Fixnum?) rdev
Returns an integer representing the device type on which stat resides. Returns nil if the operating system doesn't support this feature.
File.stat("/dev/fd1").rdev #=> 513
File.stat("/dev/tty").rdev #=> 1280
|
|
# File 'file.c'
static VALUE
rb_stat_rdev(VALUE self)
{
#ifdef HAVE_ST_RDEV
return DEVT2NUM(get_stat(self)->st_rdev);
#else
return Qnil;
#endif
}
|
- (Fixnum) rdev_major
Returns the major part of File_Stat#rdev or nil.
File.stat("/dev/fd1").rdev_major #=> 2
File.stat("/dev/tty").rdev_major #=> 5
|
|
# File 'file.c'
static VALUE
rb_stat_rdev_major(VALUE self)
{
#if defined(HAVE_ST_RDEV) && defined(major)
return DEVT2NUM(major(get_stat(self)->st_rdev));
#else
return Qnil;
#endif
}
|
- (Fixnum) rdev_minor
Returns the minor part of File_Stat#rdev or nil.
File.stat("/dev/fd1").rdev_minor #=> 1
File.stat("/dev/tty").rdev_minor #=> 0
|
|
# File 'file.c'
static VALUE
rb_stat_rdev_minor(VALUE self)
{
#if defined(HAVE_ST_RDEV) && defined(minor)
return DEVT2NUM(minor(get_stat(self)->st_rdev));
#else
return Qnil;
#endif
}
|
- (Boolean) readable?
Returns true if stat is readable by the effective user id of this process.
File.stat("testfile").readable? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_r(VALUE obj)
{
struct stat *st = get_stat(obj);
#ifdef USE_GETEUID
if (geteuid() == 0) return Qtrue;
#endif
#ifdef S_IRUSR
if (rb_stat_owned(obj))
return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IRGRP
if (rb_stat_grpowned(obj))
return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IROTH
if (!(st->st_mode & S_IROTH)) return Qfalse;
#endif
return Qtrue;
}
|
- (Boolean) readable_real?
Returns true if stat is readable by the real user id of this process.
File.stat("testfile").readable_real? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_R(VALUE obj)
{
struct stat *st = get_stat(obj);
#ifdef USE_GETEUID
if (getuid() == 0) return Qtrue;
#endif
#ifdef S_IRUSR
if (rb_stat_rowned(obj))
return st->st_mode & S_IRUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IRGRP
if (rb_group_member(get_stat(obj)->st_gid))
return st->st_mode & S_IRGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IROTH
if (!(st->st_mode & S_IROTH)) return Qfalse;
#endif
return Qtrue;
}
|
- (Boolean) setgid?
Returns true if stat has the set-group-id permission bit set, false if it doesn't or if the operating system doesn't support this feature.
File.stat("/usr/sbin/lpc").setgid? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_sgid(VALUE obj)
{
#ifdef S_ISGID
if (get_stat(obj)->st_mode & S_ISGID) return Qtrue;
#endif
return Qfalse;
}
|
- (Boolean) setuid?
Returns true if stat has the set-user-id permission bit set, false if it doesn't or if the operating system doesn't support this feature.
File.stat("/bin/su").setuid? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_suid(VALUE obj)
{
#ifdef S_ISUID
if (get_stat(obj)->st_mode & S_ISUID) return Qtrue;
#endif
return Qfalse;
}
|
- (Fixnum) size
Returns the size of stat in bytes.
File.stat("testfile").size #=> 66
|
|
# File 'file.c'
static VALUE
rb_stat_size(VALUE self)
{
return OFFT2NUM(get_stat(self)->st_size);
}
|
- (Integer) size
Returns the size of stat in bytes.
File.stat("testfile").size #=> 66
|
|
# File 'file.c'
static VALUE
rb_stat_s(VALUE obj)
{
off_t size = get_stat(obj)->st_size;
if (size == 0) return Qnil;
return OFFT2NUM(size);
}
|
- (Boolean) socket?
Returns true if stat is a socket, false if it isn't or if the operating system doesn't support this feature.
File.stat("testfile").socket? #=> false
|
|
# File 'file.c'
static VALUE
rb_stat_S(VALUE obj)
{
#ifdef S_ISSOCK
if (S_ISSOCK(get_stat(obj)->st_mode)) return Qtrue;
#endif
return Qfalse;
}
|
- (Boolean) sticky?
Returns true if stat has its sticky bit set, false if it doesn't or if the operating system doesn't support this feature.
File.stat("testfile").sticky? #=> false
|
|
# File 'file.c'
static VALUE
rb_stat_sticky(VALUE obj)
{
#ifdef S_ISVTX
if (get_stat(obj)->st_mode & S_ISVTX) return Qtrue;
#endif
return Qfalse;
}
|
- (Boolean) symlink?
Returns true if stat is a symbolic link, false if it isn't or if the operating system doesn't support this feature. As File::stat automatically follows symbolic links, symlink? will always be false for an object returned by File::stat.
File.symlink("testfile", "alink") #=> 0
File.stat("alink").symlink? #=> false
File.lstat("alink").symlink? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_l(VALUE obj)
{
#ifdef S_ISLNK
if (S_ISLNK(get_stat(obj)->st_mode)) return Qtrue;
#endif
return Qfalse;
}
|
- (Fixnum) uid
Returns the numeric user id of the owner of stat.
File.stat("testfile").uid #=> 501
|
|
# File 'file.c'
static VALUE
rb_stat_uid(VALUE self)
{
return UIDT2NUM(get_stat(self)->st_uid);
}
|
- (Fixnum?) world_readable?
If stat is readable by others, returns an integer representing the file permission bits of stat. Returns nil otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2).
m = File.stat("/etc/passwd").world_readable? #=> 420
sprintf("%o", m) #=> "644"
|
|
# File 'file.c'
static VALUE
rb_stat_wr(VALUE obj)
{
#ifdef S_IROTH
if ((get_stat(obj)->st_mode & (S_IROTH)) == S_IROTH) {
return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
}
|
- (Fixnum?) world_writable?
If stat is writable by others, returns an integer representing the file permission bits of stat. Returns nil otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2).
m = File.stat("/tmp").world_writable? #=> 511
sprintf("%o", m) #=> "777"
|
|
# File 'file.c'
static VALUE
rb_stat_ww(VALUE obj)
{
#ifdef S_IROTH
if ((get_stat(obj)->st_mode & (S_IWOTH)) == S_IWOTH) {
return UINT2NUM(get_stat(obj)->st_mode & (S_IRUGO|S_IWUGO|S_IXUGO));
}
|
- (Boolean) writable?
Returns true if stat is writable by the effective user id of this process.
File.stat("testfile").writable? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_w(VALUE obj)
{
struct stat *st = get_stat(obj);
#ifdef USE_GETEUID
if (geteuid() == 0) return Qtrue;
#endif
#ifdef S_IWUSR
if (rb_stat_owned(obj))
return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IWGRP
if (rb_stat_grpowned(obj))
return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IWOTH
if (!(st->st_mode & S_IWOTH)) return Qfalse;
#endif
return Qtrue;
}
|
- (Boolean) writable_real?
Returns true if stat is writable by the real user id of this process.
File.stat("testfile").writable_real? #=> true
|
|
# File 'file.c'
static VALUE
rb_stat_W(VALUE obj)
{
struct stat *st = get_stat(obj);
#ifdef USE_GETEUID
if (getuid() == 0) return Qtrue;
#endif
#ifdef S_IWUSR
if (rb_stat_rowned(obj))
return st->st_mode & S_IWUSR ? Qtrue : Qfalse;
#endif
#ifdef S_IWGRP
if (rb_group_member(get_stat(obj)->st_gid))
return st->st_mode & S_IWGRP ? Qtrue : Qfalse;
#endif
#ifdef S_IWOTH
if (!(st->st_mode & S_IWOTH)) return Qfalse;
#endif
return Qtrue;
}
|
- (Boolean) zero?
Returns true if stat is a zero-length file; false otherwise.
File.stat("testfile").zero? #=> false
|
|
# File 'file.c'
static VALUE
rb_stat_z(VALUE obj)
{
if (get_stat(obj)->st_size == 0) return Qtrue;
return Qfalse;
}
|