blob: 85e4a284494368a593f9eedfe2a1a6fbf2f4adaf (
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
/*
* Filename handling header file for the Fast Light Tool Kit (FLTK).
*
* Copyright 1998-2025 by Bill Spitzak and others.
*
* This library is free software. Distribution and use rights are outlined in
* the file "COPYING" which should have been included with this file. If this
* file is missing or damaged, see the license at:
*
* https://www.fltk.org/COPYING.php
*
* Please see the following page on how to report bugs and issues:
*
* https://www.fltk.org/bugs.php
*/
/** \file fluid/filename.h
\brief Handling file names operations that are not in the core library.
*/
#ifndef FLUID_TOOLS_FILENAME_H
#define FLUID_TOOLS_FILENAME_H
#include <FL/filename.H>
#include <FL/fl_utf8.h>
#include <string>
std::string fl_filename_shortened(const std::string &filename, int maxchars);
// Wrapper functions for filename operations returning std::string
// These are FLUID-local implementations of functions that were removed from core FLTK
std::string fl_getcwd_str();
std::string fl_filename_path_str(const char *filename);
std::string fl_filename_path_str(const std::string &filename);
std::string fl_filename_absolute_str(const char *from);
std::string fl_filename_absolute_str(const std::string &from);
std::string fl_filename_absolute_str(const char *from, const char *cwd);
std::string fl_filename_absolute_str(const std::string &from, const std::string &cwd);
std::string fl_filename_relative_str(const char *from);
std::string fl_filename_relative_str(const std::string &from);
std::string fl_filename_name_str(const char *filename);
std::string fl_filename_name_str(const std::string &filename);
std::string fl_filename_setext_str(const char *filename, const char *ext);
std::string fl_filename_setext_str(const std::string &filename, const std::string &ext);
std::string fl_filename_expand_str(const std::string &from);
std::string fl_filename_ext_str(const char *filename);
std::string fl_filename_ext_str(const std::string &filename);
namespace fld {
extern std::string end_with_slash(const std::string &fn);
extern std::string fix_separators(const std::string &fn);
} // namespace fld
#endif // FLUID_TOOLS_FILENAME_H
|