// 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 #include namespace brep { // Append the @ 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 / ('@' + tenant)) : dir; } } #endif // MOD_UTILITY_HXX