lib/faster_path.rb in faster_path-0.1.5 vs lib/faster_path.rb in faster_path-0.1.6
- old
+ new
@@ -6,10 +6,15 @@
# Spec to Pathname#absolute?
def self.absolute?(pth)
Rust.is_absolute(pth)
end
+ # Spec to Pathname#directory?
+ def self.directory?(pth)
+ Rust.is_directory(pth)
+ end
+
# Spec to Pathname#relative?
def self.relative?(pth)
Rust.is_relative(pth)
end
@@ -51,9 +56,10 @@
self[:data].get_array_of_string(0, self[:len]).compact
end
end
attach_function :is_absolute, [ :string ], :bool
+ attach_function :is_directory, [ :string ], :bool
attach_function :is_relative, [ :string ], :bool
attach_function :is_blank, [ :string ], :bool
attach_function :both_are_blank, [ :string, :string ], :bool
attach_function :basename, [ :string, :string ], :string
attach_function :dirname, [ :string ], :string