Class: RSpec::Support::DirectoryMaker

### Home Classes Methods

### In Files

- lib/rspec/support/directory_maker.rb

### Parent

Object

### Methods

- ::mkdir_p

### Class/Module Index

Quicksearch

- RSpec
- RSpec::CallerFilter
- RSpec::Support
- RSpec::Support::BlockSignature
- RSpec::Support::Differ
- RSpec::Support::DirectoryMaker
- RSpec::Support::EncodedString
- RSpec::Support::FormattingSupport
- RSpec::Support::FuzzyMatcher
- RSpec::Support::HunkGenerator
- RSpec::Support::InSubProcess
- RSpec::Support::LooseSignatureVerifier
- RSpec::Support::LooseSignatureVerifier::SignatureWithKeywordArgumentsMatcher
- RSpec::Support::MethodSignature
- RSpec::Support::MethodSignatureVerifier
- RSpec::Support::OS
- RSpec::Support::RecursiveConstMethods
- RSpec::Support::Ruby
- RSpec::Support::RubyFeatures
- RSpec::Support::ShellOut
- RSpec::Support::Spec
- RSpec::Support::StdErrSplitter
- RSpec::Support::StrictSignatureVerifier
- RSpec::Support::Version
- RSpec::Support::VersionChecker
- RSpec::Support::Warnings
- RSpec::Support::WarningsPrevention
- RSpec::Support::WithIsolatedStdErr
- Object
- RSpecHelpers

No matching classes.

# RSpec::Support::DirectoryMaker

@api private

Replacement for fileutilsmkdir_p because we don't want to require parts of stdlib in RSpec.

### Public Class Methods

mkdir_p(path) click to toggle source

@api private

Implements nested directory construction

    # File lib/rspec/support/directory_maker.rb, line 13
    def self.mkdir_p(path)
      stack = generate_stack(path)
      path.split(File::SEPARATOR).each do |part|
        stack = generate_path(stack, part)
        begin
          Dir.mkdir(stack) unless directory_exists?(stack)
        rescue Errno::ENOTDIR => e
          raise Errno::EEXIST, e.message
        end
      end
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.