Module: Fec::FileHelper

Included in:
FileExtensionChanger
Defined in:
lib/fec/file_helper.rb

Instance Method Summary collapse

Instance Method Details

#directory?(path) ⇒ Boolean

Returns:

  • (Boolean)


4
5
6
7
8
# File 'lib/fec/file_helper.rb', line 4

def directory?(path)
  parrent = File.expand_path('..', path)
  path = File.basename(path)
  File.directory?(File.join(parrent, path)) && !(path == '.' || path == '..')
end