class VirtFS::VPathname
Public Class Methods
getwd()
click to toggle source
# File lib/virtfs/v_pathname.rb, line 3 def self.getwd new(::Dir.getwd) end
glob(*args) { |new(p)| ... }
click to toggle source
# File lib/virtfs/v_pathname.rb, line 11 def self.glob(*args) return ::Dir.glob(args).collect { |p| new(p) } unless block_given? ::Dir.glob(*args).each { |p| yield(new(p)) } end
pwd()
click to toggle source
# File lib/virtfs/v_pathname.rb, line 7 def self.pwd getwd end
Public Instance Methods
atime()
click to toggle source
absolute? ascend
# File lib/virtfs/v_pathname.rb, line 19 def atime ::File.atime(to_path) end
binread(*args)
click to toggle source
basename
# File lib/virtfs/v_pathname.rb, line 25 def binread(*args) ::File.binread(to_path, *args) end
expand_path(dirstring = nil)
click to toggle source
binwrite birthtime blockdev? chardev? children chmod chown cleanpath ctime delete descend directory? dirname each_child each_entry each_filename each_line empty? entries eql? executable? executable_real? exist?
# File lib/virtfs/v_pathname.rb, line 53 def expand_path(dirstring = nil) return self if absolute? self.class.new(::File.expand_path(to_path, dirstring)) end
file?()
click to toggle source
extname
# File lib/virtfs/v_pathname.rb, line 60 def file? ::File.file?(to_path) end
read(*args)
click to toggle source
find fnmatch fnmatch? freeze ftype grpowned? join lchmod lchown lstat make_link make_symlink mkdir mkpath mountpoint? mtime open opendir owned? parent pipe?
# File lib/virtfs/v_pathname.rb, line 86 def read(*args) ::File.open(to_path, "r") { |f| return f.read(*args) } end