blob: 2ce1e071f6d63eb4d1de4791686c8e369ca83e36 (
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
|
// file : mod/utility.hxx -*- C++ -*-
// copyright : Copyright (c) 2014-2018 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
#ifndef MOD_UTILITY_HXX
#define MOD_UTILITY_HXX
#include <libbrep/types.hxx>
#include <libbrep/utility.hxx>
namespace brep
{
// Append the @<tenant> leaf component to the directory if the tenant is
// not empty. Otherwise, return the directory unchanged.
//
inline dir_path
tenant_dir (const dir_path& dir, const string& tenant)
{
return !tenant.empty ()
? path_cast<dir_path> (dir / ('@' + tenant))
: dir;
}
}
#endif // MOD_UTILITY_HXX
|