Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
dir-util.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
/*
5 * Authors: see git history
6 *
7 * Copyright (C) 2016 Authors
8 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
9 */
10#ifndef SEEN_DIR_UTIL_H
11#define SEEN_DIR_UTIL_H
12
13/*
14 * path-util.h
15 *
16 * here are functions sp_relative_path & cousins
17 * maybe they are already implemented in standard libs
18 *
19 */
20
21#include <cstdlib>
22#include <string>
23
36std::string sp_relative_path_from_path(std::string const &path, std::string const &base);
37
38char const *sp_extension_from_path(char const *path);
39
57char *inkscape_rel2abs(char const *path, char const *base, char *result, size_t const size);
58
59char *inkscape_abs2rel(char const *path, char const *base, char *result, size_t const size);
60
61char *prepend_current_dir_if_relative(char const *filename);
62
63
64#endif // !SEEN_DIR_UTIL_H
65
66/*
67 Local Variables:
68 mode:c++
69 c-file-style:"stroustrup"
70 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
71 indent-tabs-mode:nil
72 fill-column:99
73 End:
74*/
75// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
Css & result
Geom::IntPoint size
char * inkscape_abs2rel(char const *path, char const *base, char *result, size_t const size)
Definition dir-util.cpp:159
char const * sp_extension_from_path(char const *path)
Definition dir-util.cpp:51
std::string sp_relative_path_from_path(std::string const &path, std::string const &base)
Returns a form of path relative to base if that is easy to construct (eg if path appears to be in the...
Definition dir-util.cpp:21
char * prepend_current_dir_if_relative(char const *filename)
char * inkscape_rel2abs(char const *path, char const *base, char *result, size_t const size)
Convert a relative path name into absolute.
Definition dir-util.cpp:73