File.starts_with
starts_withparent
Group: Text
Documentation
Checks whether the file is within another path.
Arguments
parent
: The path to check if self is contained within.
Examples
Check if a file is within another path.
is_within = File.new "foo/bar" . starts_with (File.new "foo")
is_not_within = File.new "foo/bar" . starts_with (File.new "f")