Sha256: d32b1563b83fd7caae16e9454021d61130b7ed275ccf236af452a0e654f94fd8

Contents?: true

Size: 425 Bytes

Versions: 21

Compression:

Stored size: 425 Bytes

Contents

# == Synopsis
# add a mkdirs method to the File class
class File
  class << self
    my_extension("mkdirs") do
      ##
      # make directories including any missing in the path
      #
      # @param [String] dirspec the path to make sure exists
      def File.mkdirs(dirspec)
        unless File.exists?(dirspec)
          mkdirs(File.dirname(dirspec))
          Dir.mkdir(dirspec)
        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 5 rubygems

Version Path
royw-dvdprofiler2xbmc-0.0.15 lib/file_extensions.rb
royw-dvdprofiler2xbmc-0.0.17 lib/file_extensions.rb
royw-dvdprofiler2xbmc-0.0.18 lib/file_extensions.rb
royw-dvdprofiler2xbmc-0.0.19 lib/file_extensions.rb
royw-dvdprofiler_collection-0.0.2 lib/file_extensions.rb
royw-dvdprofiler_collection-0.0.3 lib/file_extensions.rb
royw-dvdprofiler_collection-0.1.0 lib/file_extensions.rb
royw-dvdprofiler_collection-0.1.1 lib/file_extensions.rb
royw-dvdprofiler_collection-0.1.2 lib/file_extensions.rb
royw-imdb-0.0.21 lib/file_extensions.rb
royw-imdb-0.1.0 lib/file_extensions.rb
royw-imdb-0.1.1 lib/file_extensions.rb
royw-imdb-0.1.2 lib/file_extensions.rb
royw-read_page_cache-0.0.1 lib/file_extensions.rb
royw-tmdb-0.0.2 lib/file_extensions.rb
royw-tmdb-0.1.0 lib/file_extensions.rb
royw-tmdb-0.1.1 lib/file_extensions.rb
royw-tmdb-0.1.2 lib/file_extensions.rb
royw-tmdb-0.1.3 lib/file_extensions.rb
royw-tmdb-0.1.4 lib/file_extensions.rb