class File

Public Class Methods

anything_exist?(path) click to toggle source
# File lib/qdumpfs/util.rb, line 26
def self.anything_exist?(path)
  FileTest.exist?(path) or FileTest.symlink?(path)
end
readable_file?(path) click to toggle source
# File lib/qdumpfs/util.rb, line 47
def self.readable_file?(path)
  FileTest.file?(path) and FileTest.readable?(path)
end
real_directory?(path) click to toggle source
# File lib/qdumpfs/util.rb, line 30
def self.real_directory?(path)
  FileTest.directory?(path) and not FileTest.symlink?(path)
end
real_file?(path) click to toggle source
# File lib/qdumpfs/util.rb, line 22
def self.real_file?(path)
  FileTest.file?(path) and not FileTest.symlink?(path)
end
split_all(path) click to toggle source
# File lib/qdumpfs/util.rb, line 51
def self.split_all(path)
  parts = []
  while true
    dirname, basename = File.split(path)
    break if path == dirname
    parts.unshift(basename) unless basename == "."
    path = dirname
  end
  return parts
end
utime(a, m, dir) click to toggle source
# File lib/qdumpfs/win32.rb, line 82
def File.utime(a, m, dir)
  File.utime_orig(a, m, dir)  unless(File.directory?(dir))

  atime = get_file_time(a.dup.utc)
  mtime = get_file_time(m.dup.utc)

  hDir = CreateFile.Call(dir.dup, GENERIC_WRITE, 0, 0, OPEN_EXISTING,
  FILE_FLAG_BACKUP_SEMANTICS, 0)
  SetFileTime.call(hDir, 0, atime, mtime)
  CloseHandle.Call(hDir)

  return 0
end
Also aliased as: utime_orig
utime_orig(a, m, dir)
Alias for: utime