File

Description


Class Methods


#

extname ( filename ) => String

Returns extension part of a File

 File.extname("loop.gb") # => .gb
  • Parameter: filename (String) : No Doc

( source )

#

chmod ( filename ) => Integer

Changes the mode of the file. Return number of files.

 File.chmod(0755, "test.sh") # => 1
 File.chmod(0755, "goby", "../test.sh") # => 2
  • Parameter: filename (String) : No Doc

( source )

#

size ( filename ) => Integer

Returns size of file in bytes.

 File.size("loop.gb") # => 321123
  • Parameter: filename (String) : No Doc

( source )

#

basename ( filepath ) => String

Returns the last element from path.

 File.basename("/home/goby/plugin/loop.gb") # => loop.gb
  • Parameter: filepath (String) : No Doc

( source )

#

join => String

Returns string with joined elements.

 File.join("home", "goby", "plugin") # => home/goby/plugin

( source )

#

split ( filepath ) => Array

Returns array of path and file.

 File.split("/home/goby/.settings") # => ["/home/goby/", ".settings"]
  • Parameter: filepath (String) : No Doc
  • Return: (Array) : No Doc

( source )

Instance Methods