Module: FileTest

Defined in:
lib/torquebox/vfs/ext/file_test.rb

Overview

Copyright 2008-2011 Red Hat, Inc, and individual contributors.

This is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this software; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA, or see the FSF site: www.fsf.org.

Class Method Summary collapse

Class Method Details

.directory?(filename) ⇒ Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/torquebox/vfs/ext/file_test.rb', line 22

def directory?(filename)
  File.directory?(filename)
end

.exist?(filename) ⇒ Boolean

Returns:

  • (Boolean)


26
27
28
# File 'lib/torquebox/vfs/ext/file_test.rb', line 26

def exist?(filename)
  File.exist?(filename)
end

.exists?(filename) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
# File 'lib/torquebox/vfs/ext/file_test.rb', line 30

def exists?(filename)
  File.exists?(filename)
end

.file?(filename) ⇒ Boolean

Returns:

  • (Boolean)


34
35
36
# File 'lib/torquebox/vfs/ext/file_test.rb', line 34

def file?(filename)
  File.file?(filename)
end

.readable?(filename) ⇒ Boolean

Returns:

  • (Boolean)


38
39
40
# File 'lib/torquebox/vfs/ext/file_test.rb', line 38

def readable?(filename)
  File.readable?(filename)
end

.size(filename) ⇒ Object



46
47
48
# File 'lib/torquebox/vfs/ext/file_test.rb', line 46

def size(filename)
  File.size(filename)
end

.writable?(filename) ⇒ Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/torquebox/vfs/ext/file_test.rb', line 42

def writable?(filename)
  File.writable?(filename)
end