// Code generated by counterfeiter. DO NOT EDIT.
package runruncfakes

import (
	"os"
	"sync"

	"code.cloudfoundry.org/guardian/rundmc/runrunc"
)

type FakeMkdirer struct {
	MkdirAsStub        func(string, int, int, os.FileMode, bool, ...string) error
	mkdirAsMutex       sync.RWMutex
	mkdirAsArgsForCall []struct {
		arg1 string
		arg2 int
		arg3 int
		arg4 os.FileMode
		arg5 bool
		arg6 []string
	}
	mkdirAsReturns struct {
		result1 error
	}
	mkdirAsReturnsOnCall map[int]struct {
		result1 error
	}
	invocations      map[string][][]interface{}
	invocationsMutex sync.RWMutex
}

func (fake *FakeMkdirer) MkdirAs(arg1 string, arg2 int, arg3 int, arg4 os.FileMode, arg5 bool, arg6 ...string) error {
	fake.mkdirAsMutex.Lock()
	ret, specificReturn := fake.mkdirAsReturnsOnCall[len(fake.mkdirAsArgsForCall)]
	fake.mkdirAsArgsForCall = append(fake.mkdirAsArgsForCall, struct {
		arg1 string
		arg2 int
		arg3 int
		arg4 os.FileMode
		arg5 bool
		arg6 []string
	}{arg1, arg2, arg3, arg4, arg5, arg6})
	fake.recordInvocation("MkdirAs", []interface{}{arg1, arg2, arg3, arg4, arg5, arg6})
	fake.mkdirAsMutex.Unlock()
	if fake.MkdirAsStub != nil {
		return fake.MkdirAsStub(arg1, arg2, arg3, arg4, arg5, arg6...)
	}
	if specificReturn {
		return ret.result1
	}
	fakeReturns := fake.mkdirAsReturns
	return fakeReturns.result1
}

func (fake *FakeMkdirer) MkdirAsCallCount() int {
	fake.mkdirAsMutex.RLock()
	defer fake.mkdirAsMutex.RUnlock()
	return len(fake.mkdirAsArgsForCall)
}

func (fake *FakeMkdirer) MkdirAsCalls(stub func(string, int, int, os.FileMode, bool, ...string) error) {
	fake.mkdirAsMutex.Lock()
	defer fake.mkdirAsMutex.Unlock()
	fake.MkdirAsStub = stub
}

func (fake *FakeMkdirer) MkdirAsArgsForCall(i int) (string, int, int, os.FileMode, bool, []string) {
	fake.mkdirAsMutex.RLock()
	defer fake.mkdirAsMutex.RUnlock()
	argsForCall := fake.mkdirAsArgsForCall[i]
	return argsForCall.arg1, argsForCall.arg2, argsForCall.arg3, argsForCall.arg4, argsForCall.arg5, argsForCall.arg6
}

func (fake *FakeMkdirer) MkdirAsReturns(result1 error) {
	fake.mkdirAsMutex.Lock()
	defer fake.mkdirAsMutex.Unlock()
	fake.MkdirAsStub = nil
	fake.mkdirAsReturns = struct {
		result1 error
	}{result1}
}

func (fake *FakeMkdirer) MkdirAsReturnsOnCall(i int, result1 error) {
	fake.mkdirAsMutex.Lock()
	defer fake.mkdirAsMutex.Unlock()
	fake.MkdirAsStub = nil
	if fake.mkdirAsReturnsOnCall == nil {
		fake.mkdirAsReturnsOnCall = make(map[int]struct {
			result1 error
		})
	}
	fake.mkdirAsReturnsOnCall[i] = struct {
		result1 error
	}{result1}
}

func (fake *FakeMkdirer) Invocations() map[string][][]interface{} {
	fake.invocationsMutex.RLock()
	defer fake.invocationsMutex.RUnlock()
	fake.mkdirAsMutex.RLock()
	defer fake.mkdirAsMutex.RUnlock()
	copiedInvocations := map[string][][]interface{}{}
	for key, value := range fake.invocations {
		copiedInvocations[key] = value
	}
	return copiedInvocations
}

func (fake *FakeMkdirer) recordInvocation(key string, args []interface{}) {
	fake.invocationsMutex.Lock()
	defer fake.invocationsMutex.Unlock()
	if fake.invocations == nil {
		fake.invocations = map[string][][]interface{}{}
	}
	if fake.invocations[key] == nil {
		fake.invocations[key] = [][]interface{}{}
	}
	fake.invocations[key] = append(fake.invocations[key], args)
}

var _ runrunc.Mkdirer = new(FakeMkdirer)
