Module: EacRubyUtils::Fs

Defined in:
lib/eac_ruby_utils/fs.rb,
lib/eac_ruby_utils/fs/temp.rb,
lib/eac_ruby_utils/fs/extname.rb,
lib/eac_ruby_utils/fs/temp/file.rb,
lib/eac_ruby_utils/fs/temp/directory.rb,
lib/eac_ruby_utils/fs/clearable_directory.rb

Defined Under Namespace

Modules: Temp Classes: ClearableDirectory

Class Method Summary collapse

Class Method Details

.extname(path, limit = -1)) ⇒ Object

A [File.extname] which find multiple extensions (Ex.: .tar.gz).



7
8
9
# File 'lib/eac_ruby_utils/fs/extname.rb', line 7

def extname(path, limit = -1)
  recursive_extension(::File.basename(path), limit)
end

.extname2(path) ⇒ Object

Shortcut to extname(2).



12
13
14
# File 'lib/eac_ruby_utils/fs/extname.rb', line 12

def extname2(path)
  extname(path, 2)
end