Inkscape
Vector Graphics Editor
|
TODO: insert short description here. More...
Go to the source code of this file.
Functions | |
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 directory specified by base), otherwise returns path. | |
char const * | sp_extension_from_path (char const *path) |
char * | inkscape_rel2abs (char const *path, char const *base, char *result, size_t const size) |
Convert a relative path name into absolute. | |
char * | inkscape_abs2rel (char const *path, char const *base, char *result, size_t const size) |
char * | prepend_current_dir_if_relative (char const *filename) |
TODO: insert short description here.
Definition in file dir-util.h.
char * inkscape_abs2rel | ( | char const * | path, |
char const * | base, | ||
char * | result, | ||
size_t const | size | ||
) |
Definition at line 159 of file dir-util.cpp.
char * inkscape_rel2abs | ( | char const * | path, |
char const * | base, | ||
char * | result, | ||
size_t const | size | ||
) |
Convert a relative path name into absolute.
If path is already absolute, does nothing except copying path to result.
path | relative path. |
base | base directory (must be absolute path). |
result | result buffer. |
size | size of result buffer. |
based on functions by Shigio Yamaguchi. FIXME:TODO: force it to also do path normalization of the entire resulting path, i.e. get rid of any .. and . in any place, even if 'path' is already absolute (now it returns it unchanged in this case)
Definition at line 73 of file dir-util.cpp.
References current, parent, result, and size.
Referenced by prepend_current_dir_if_relative().
char * prepend_current_dir_if_relative | ( | char const * | filename | ) |
char const * sp_extension_from_path | ( | char const * | path | ) |
Definition at line 51 of file dir-util.cpp.
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 directory specified by base), otherwise returns path.
path | is expected to be an absolute path. |
base | is expected to be either empty or the absolute path of a directory. |
Definition at line 21 of file dir-util.cpp.
References result.
Referenced by Inkscape::Shortcuts::get_file_names(), and Inkscape::Shortcuts::init().