Calls the Unicode (wide) versions of the Windows API’s file functions.
It’s a subclass of the standard File class that only overrides the methods when it’s run on a Windows system. Otherwise it functions as a normal File class. File methods not re-implemented will behave as normal - trying to call the ASCII Windows API.
# File FileW.rb, line 25 def self.atime(file_name) file_name = WinEx::FileSystem::normalize_w(file_name) return WinEx::FileSystem.get_file_data(file_name).last_access_time end
# File FileW.rb, line 32 def self.basename(file_name, suffix = nil) # (!) Verify basename = file_name.split('/').last unless suffix.nil? len = suffix.length basename[-len, len] = '' if basename[-len, len] == suffix end return basename end
# File FileW.rb, line 44 def self.catname(from, to) if self.directory?(to) # (!) Normalize file_name return self::join( to.sub(%r([/\\]$), ''), self.basename(from) ) else return to end end
# File FileW.rb, line 54 def self.ctime(file_name) file_name = WinEx::FileSystem::normalize_w(file_name) return WinEx::FileSystem.get_file_data(file_name).creation_time end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.