rename File.exists? to File.exist?
exists? is marked as obsolete in the API doc [madx]
This commit is contained in:
parent
a201579ef4
commit
98215fe488
@ -95,7 +95,7 @@ module FakeFS
|
|||||||
def chown_R(user, group, list, options={})
|
def chown_R(user, group, list, options={})
|
||||||
chown(user, group, list, options={})
|
chown(user, group, list, options={})
|
||||||
end
|
end
|
||||||
|
|
||||||
def touch(list, options={})
|
def touch(list, options={})
|
||||||
Array(list).each do |f|
|
Array(list).each do |f|
|
||||||
directory = File.dirname(f)
|
directory = File.dirname(f)
|
||||||
@ -116,10 +116,14 @@ module FakeFS
|
|||||||
parts * PATH_SEPARATOR
|
parts * PATH_SEPARATOR
|
||||||
end
|
end
|
||||||
|
|
||||||
def self.exists?(path)
|
def self.exist?(path)
|
||||||
FileSystem.find(path) || false
|
FileSystem.find(path) || false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
class << self
|
||||||
|
alias_method :exists?, :exist?
|
||||||
|
end
|
||||||
|
|
||||||
def self.directory?(path)
|
def self.directory?(path)
|
||||||
if path.respond_to? :entry
|
if path.respond_to? :entry
|
||||||
path.entry.is_a? MockDir
|
path.entry.is_a? MockDir
|
||||||
|
Loading…
Reference in New Issue
Block a user