// Mkdir implements the fs.NodeMkdirer interface for Root.
485464
func (r *Root) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (_ fs.Node, err error) {
	r.log().CDebugf(ctx, "FS Mkdir")
	defer func() { err = r.private.fs.processError(ctx, libkbfs.WriteMode, err) }()
	return nil, libkbfs.NewWriteUnsupportedError(tlfhandle.BuildCanonicalPath(r.PathType(), req.Name))
}
352521
func MkdirAll(u *user.User, path string, perm uint32) error {
	uid, gid, err := getIds(u)
	if err != nil {
		return err
	}
	args := C.au_mkdir_all_args_t{
		ids:  C.au_ids_t{uid: uid, gid: gid},
		path: C.CString(path),
		mode: C.uint(perm),
	}

	if ret, err := C.au_mkdir_all(&args); ret < 0 {
		return err
	}
	return nil
}
1028961
func (n *Network) PeerDir(p *Peer) string {
	return filepath.Join(n.RootDir, "peers", p.ID())
}
373054
func (c *Client) Mkdir(dirname string, perm os.FileMode) error {
	return c.mkdir(dirname, perm, false)
}
15414
func (p Proc) RootDir() (string, error) {
	rdir, err := os.Readlink(p.path("root"))
	if os.IsNotExist(err) {
		return "", nil
	}

	return rdir, err
}
742293
func (fp FsPath) Mkdir(perm os.FileMode) error {
	return fp.Fs.Mkdir(fp.Path, perm)
}
334654
func (d Dir) Mkdir(name string, perm os.FileMode) error {
	if name = d.resolve(name); name == "" {
		return os.ErrNotExist
	}
	return os.MkdirAll(name, perm)
}
902677
func Mkdir(path string, perm os.FileMode) error {
	err := os.MkdirAll(path, perm)
	if err != nil {
		return errors.Wrapf(err, "failed to mkdir %q", path)
	}

	return nil
}
429689
func (c *Client) Mkdir(path string, _ os.FileMode) error {
	path = FixSlashes(path)
	status := c.mkcol(path)
	if status == 201 {
		return nil
	}

	return newPathError("Mkdir", path, status)
}
948759
func newDir(name string, children []noder.Noder) (*dir, error) {
	cloned := make([]noder.Noder, len(children))
	_ = copy(cloned, children)
	sort.Sort(byName(cloned))

	if hasChildrenWithNoName(cloned) {
		return nil, fmt.Errorf("non-root inner nodes cannot have empty names")
	}

	if hasDuplicatedNames(cloned) {
		return nil, fmt.Errorf("children cannot have duplicated names")
	}

	return &dir{
		name:     name,
		children: cloned,
	}, nil
}
1363567
func mkdirp(path string) error {
	dir := filepath.Dir(path)
	if fi, err := os.Stat(dir); err != nil {
		if !os.IsNotExist(err) {
			return fmt.Errorf("error checking destination directory: %v", err)
		}
		if err := os.MkdirAll(dir, 0755); err != nil {
			return fmt.Errorf("error creating destination directory: %v", err)
		}
	} else if !fi.IsDir() {
		panic("destination path is not directory")
	}
	return nil
}
60670
func (b *Browser) MkdirAll(_ string, _ os.FileMode) (err error) {
	return errors.New("browser cannot mkdir")
}
813402
func (l *localFileSystem) MkDir(path string, mode int) error {
	fileMode := os.FileMode(mode & int(os.ModePerm))
	err := os.MkdirAll(path, fileMode)
	if err != nil && !os.IsExist(err) {
		return trace.ConvertSystemError(err)
	}

	return nil
}
787350
func (r *realFS) MkdirAll(dirName string, perm os.FileMode) error {
	return os.MkdirAll(dirName, perm)
}
61671
func (fl *FolderList) Mkdir(ctx context.Context, req *fuse.MkdirRequest) (_ fs.Node, err error) {
	fl.fs.vlog.CLogf(ctx, libkb.VLog1, "FL Mkdir")
	tlfName := tlf.CanonicalName(req.Name)
	defer func() { err = fl.processError(ctx, libkbfs.WriteMode, tlfName, err) }()
	return nil, libkbfs.NewWriteUnsupportedError(tlfhandle.BuildCanonicalPath(fl.PathType(), string(tlfName)))
}
804651
func (s *Application) RootDir() string {
	if len(s.rootDir) == 0 {
		ppath := os.Getenv(strings.ToUpper(s.Name) + `PATH`)
		if len(ppath) == 0 {
			ppath, _ = filepath.Abs(os.Args[0])
			ppath = filepath.Dir(ppath)
		}
		s.rootDir = ppath
	}
	return s.rootDir
}
29814
func (c *C) MkDir() string {
	path := c.tempDir.newPath()
	if err := os.Mkdir(path, 0700); err != nil {
		panic(fmt.Sprintf("Couldn't create temporary directory %s: %s", path, err.Error()))
	}
	return path
}