Add File.exists? as a wrapper to File.stat
git-svn-id: file:///home/svn/framework3/trunk@12324 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
904e7af88b
commit
50155919ea
|
@ -97,6 +97,14 @@ Separator = "\\"
|
|||
return client.fs.filestat.new(name)
|
||||
end
|
||||
|
||||
#
|
||||
# Determines if a file exists and returns true/false
|
||||
#
|
||||
def File.exists?(name)
|
||||
r = client.fs.filestat.new(name) rescue nil
|
||||
r ? true : false
|
||||
end
|
||||
|
||||
#
|
||||
# Performs a delete on the specified file.
|
||||
#
|
||||
|
|
Loading…
Reference in New Issue