aboutsummaryrefslogtreecommitdiff
path: root/bpkg/utility
blob: f2c0ab5c98b424f177689fa6a571c368d784165f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
// file      : bpkg/utility -*- C++ -*-
// copyright : Copyright (c) 2014-2015 Code Synthesis Ltd
// license   : MIT; see accompanying LICENSE file

#ifndef BPKG_UTILITY
#define BPKG_UTILITY

#include <bpkg/types>

namespace bpkg
{
  // Filesystem.
  //
  bool
  exists (const path&);

  bool
  exists (const dir_path&);

  bool
  empty (const dir_path&);

  void
  mk (const dir_path&);

  void
  mk_p (const dir_path&);

  void
  rm_r (const dir_path&, bool dir = true);

  // Process.
  //
  void
  run (const char* const args[]);

  inline void
  run (const cstrings& args) {run (args.data ());}
}

#endif // BPKG_UTILITY