aboutsummaryrefslogtreecommitdiff
path: root/build/mkdir.cxx
blob: 1fbab039f00dbdc9534ed47c8d69b5f92e83d6f2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// file      : build/mkdir.cxx -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Tools CC
// license   : MIT; see accompanying LICENSE file

#include <build/mkdir>

#include <sys/stat.h> // mkdir()

#include <system_error>

using namespace std;

namespace build
{
  void
  mkdir (const path& p, mode_t m)
  {
    if (::mkdir (p.string ().c_str (), m) != 0)
      throw system_error (errno, system_category ());
  }
}