struct

Pathname

Inherits Comparable < Struct < Value < Object

Constants

VERSION = "0.1.6"

Constructors

new(path : String)
Source
new(path : Pathname)
Source

Class methods

glob(patterns : Enumerable(String), &)
Source
glob(*patterns, &)
Source
glob(patterns : Enumerable(String))
Source
glob(*patterns)
Source

Instance methods

+(other : String) : Pathname
Source
/(other : String) : Pathname
Source
<=>(other : Pathname)

The comparison operator. Returns 0 if the two objects are equal, a negative number if this object is considered less than other, a positive number if this object is considered greater than other, or nil if the two objects are not comparable.

Subclasses define this method to provide class-specific ordering.

The comparison operator is usually used to sort values:

# Sort in a descending way:
[3, 1, 2].sort { |x, y| y <=> x } # => [3, 2, 1]

# Sort in an ascending way:
[3, 1, 2].sort { |x, y| x <=> y } # => [1, 2, 3]
Source
===(other : Pathname)
Source
absolute?
Source
ascend
Source
atime
Source
basename(suffix : String) : Pathname
Source
basename
Source
blockdev?
Source
chardev?
Source
children(with_directory : Bool = true) : Array(Pathname)
Source
ctime
Source
delete
Source
descend
Source
directory?
Source
dirname
Source
each_child(with_directory : Bool = true, &)
Source
each_entry
Source
each_filename
Source
each_line
Source
entries
Source
executable?
Source
exists?
Source
expand_path(default_dir : Pathname) : Pathname
Source
expand_path(default_dir : String = Dir.current)
Source
extname
Source
file?
Source
filenames
Source
inspect(io)
Source
join(*args) : Pathname
Source
lstat
Source
mkdir(mode = 329)
Source
mkdir_p(mode = 329)
Source
mtime
Source
open(mode = "r", perm = DEFAULT_CREATE_MODE)
Source
open(mode = "r", perm = DEFAULT_CREATE_MODE, &)
Source
opendir
Source
opendir
Source
parent
Source
read(encoding = nil, invalid = nil) : String
Source
readable?
Source
real_path
Source
relative?
Source
relative_path_from(base_directory : String) : Pathname
Source
relative_path_from(base_directory : Pathname) : Pathname
Source
rename(to)
Source
rmdir
Source
root?
Source
setgid?
Source
setuid?
Source
size
Source
size?
Source
socket?
Source
split
Source
stat
Source
sticky?
Source
sub(pattern, replace) : Pathname
Source
sub(pattern, &)
Source
sub_ext(replace : String)
Source
to_s(io)
Source
truncate(size = 0)
Source
utime
Source
world_readable?
Source
world_writable?
Source
writable?
Source
write(content, perm = DEFAULT_CREATE_MODE, encoding = nil, invalid = nil)
Source
zero?
Source