Sidef
view release on metacpan or search on metacpan
lib/Sidef/Types/Glob/File.pm view on Meta::CPAN
my ($self) = @_;
Sidef::Types::Glob::Stat->stat("$self", $self);
}
sub lstat {
ref($_[0]) || shift(@_);
my ($self) = @_;
Sidef::Types::Glob::Stat->lstat("$self", $self);
}
sub chown {
ref($_[0]) || shift(@_);
my ($self, $uid, $gid) = @_;
CORE::chown($uid, $gid, "$self")
? (Sidef::Types::Bool::Bool::TRUE)
: (Sidef::Types::Bool::Bool::FALSE);
}
sub chmod {
ref($_[0]) || shift(@_);
my ($self, $permission) = @_;
CORE::chmod($permission, "$self")
? (Sidef::Types::Bool::Bool::TRUE)
: (Sidef::Types::Bool::Bool::FALSE);
lib/Sidef/Types/Glob/File.pod view on Meta::CPAN
file.readlink
Reads the target of a symbolic link, returning it as a C<Dir> object if the target is itself a directory, or as a C<File> object otherwise. If the path isn't actually a symbolic link, the returned object wraps an undefined path rather than being C<ni...
var target = File("shortcut").readlink
Aliases: I<read_link>
=cut
=head2 chown
file.chown(uid, gid)
Changes the file's owner and group (as numeric IDs). Returns C<true> on success, C<false> otherwise. May require elevated privileges.
File("data.txt").chown(1000, 1000)
=cut
=head2 chmod
file.chmod(permission)
Changes the file's permission bits. Returns C<true> on success, C<false> otherwise.
File("script.sh").chmod(0755)
( run in 1.083 second using v1.01-cache-2.11-cpan-92ad3014f07 )