module Cd::AsAnyEntry
Overview
Manupulates a file or directory path.
Direct including types
Defined in:
lib/as_any_entry.crInstance Method Summary
-
#append(text)
Appends text to this entry as a file.
-
#basedir
Returns a new
DirEntry
that contains this entry. -
#basename(suffix : String | Nil = nil)
Returns this entry's base name.
-
#chmod(mode : Int)
Changes this entry's mode.
-
#cp(dst : String)
Copies this entry as a file to the dst path.
-
#cp(dst : AsAnyEntry)
Copies this entry as a file to the dst path.
-
#directory?(*args)
Tests if this entry is a directory.
-
#dirname
Returns a directory path that contains this entry.
-
#executable?(*args)
Tests if this entry is executable.
-
#exists?
Tests if this entry exists.
-
#file?(*args)
Tests if this entry is a file.
-
#join(*args)
Joins this entry's path and given path components.
-
#read
Reads this entry as a file.
-
#real_path
Returns this entry's real path.
-
#remove
Removes this entry.
-
#symlink?
Tests if this entry is a symlink.
-
#to_dir
Creates a new
DirEntry
with this entry's path. -
#to_s(io : IO)
Writes this entry's path to the IO.
-
#touch(mode : Int | Nil = nil)
Creates an empty file if this entry does not exists.
-
#write(text, mode : Int | Nil = nil)
Writes text to this entry as a file.