diff --git a/mrbgems/mruby-io/mrblib/file.rb b/mrbgems/mruby-io/mrblib/file.rb index 9269ecc7b..a1c62d6d7 100644 --- a/mrbgems/mruby-io/mrblib/file.rb +++ b/mrbgems/mruby-io/mrblib/file.rb @@ -104,122 +104,6 @@ class File < IO end end - # - # call-seq: - # File.directory?(file_name) -> true or false - # - # Returns true if the named file is a directory, or a symlink that points at a directory, and false otherwise. - # - # File.directory?(".") #=> true - # - def self.directory?(file) - FileTest.directory?(file) - end - - # - # call-seq: - # File.exist?(file_name) -> true or false - # - # Return true if the named file exists. - # - # File.exist?("config.h") #=> true - # File.exist?("no_such_file") #=> false - # - def self.exist?(file) - FileTest.exist?(file) - end - - # - # call-seq: - # File.exists?(file_name) -> true or false - # - # Deprecated method that is equivalent to File.exist?. - # - def self.exists?(file) - FileTest.exists?(file) - end - - # - # call-seq: - # File.file?(file) -> true or false - # - # Returns true if the named file exists and is a regular file. - # - # File.file?("testfile") #=> true - # - def self.file?(file) - FileTest.file?(file) - end - - # - # call-seq: - # File.pipe?(file_name) -> true or false - # - # Returns true if the named file is a pipe. - # - # File.pipe?("/dev/stdin") #=> true - # - def self.pipe?(file) - FileTest.pipe?(file) - end - - # - # call-seq: - # File.size(file_name) -> integer - # - # Returns the size of file_name. - # - # File.size("testfile") #=> 66 - # - def self.size(file) - FileTest.size(file) - end - - # - # call-seq: - # File.size?(file_name) -> integer or nil - # - # Returns nil if file_name doesn't exist or has zero size, the size of the file otherwise. - # - # File.size?("testfile") #=> 66 - # - def self.size?(file) - FileTest.size?(file) - end - - # - # call-seq: - # File.socket?(file_name) -> true or false - # - # Returns true if the named file is a socket. - # - # File.socket?("/tmp/.X11-unix/X0") #=> true - # - def self.socket?(file) - FileTest.socket?(file) - end - - # - # call-seq: - # File.symlink?(file_name) -> true or false - # - # Returns true if the named file is a symbolic link. - # - def self.symlink?(file) - FileTest.symlink?(file) - end - - # - # call-seq: - # File.zero?(file_name) -> true or false - # - # Returns true if the named file exists and has a zero size. - # - # File.zero?("testfile") #=> false - # - def self.zero?(file) - FileTest.zero?(file) - end end