monotone

monotone Mtn Source Tree

Root/path_component.hh

1#ifndef __PATH_COMPONENT_HH__
2#define __PATH_COMPONENT_HH__
3
4// copyright (C) 2005 nathaniel smith <njs@pobox.com>
5// all rights reserved.
6// licensed to the public under the terms of the GNU GPL (>= 2)
7// see the file COPYING for details
8
9#include <vector>
10
11#include "file_io.hh"
12#include "numeric_vocab.hh"
13#include "vocab.hh"
14
15typedef u32 path_component;
16
17void
18compose_path(std::vector<path_component> const & names,
19 file_path & path);
20
21void
22split_path(file_path const & p,
23 std::vector<path_component> & components);
24
25void
26split_path(file_path const & p,
27 std::vector<path_component> & prefix,
28 path_component & leaf_path);
29
30path_component
31make_null_component();
32
33inline bool
34null_name(path_component pc)
35{
36 return make_null_component() == pc;
37}
38
39#endif

Archive Download this file

Branches

Tags

Quick Links:     www.monotone.ca    -     Downloads    -     Documentation    -     Wiki    -     Code Forge    -     Build Status