|
That Terminal
A terminal emulator designed for video making purposes.
|
Facilities for finding share-files (files supplied with program) and cache-files (files generated by program). More...
#include <string>#include <string_view>#include <filesystem>

Go to the source code of this file.
Functions | |
| void | SaveArg0 (const char *arg0) |
| std::pair< std::filesystem::path, std::filesystem::file_status > | FindShareFile (const std::filesystem::path &file_to_find, std::initializer_list< std::string_view > extra_paths={}) |
| std::pair< std::filesystem::path, std::filesystem::file_status > | FindCacheFile (const std::filesystem::path &file_to_find, bool is_file) |
Facilities for finding share-files (files supplied with program) and cache-files (files generated by program).
| std::pair<std::filesystem::path, std::filesystem::file_status> FindCacheFile | ( | const std::filesystem::path & | file_to_find, |
| bool | is_file | ||
| ) |
Attempts to locate a particular file (files generated by that_terminal).
These directories are searched, in order: $HOME/.cache/that_terminal
/home/$USER/.cache/that_terminal
/run/user/$UID
/run/$UID
$TEMP/that_terminal-$UID followed by the extra paths, if given. where $UID stands for value of getuid(), not an environment variable.
| file_to_find | Findname to search for |
| is_file | True if looking for files, false if for directories. |
| std::pair<std::filesystem::path, std::filesystem::file_status> FindShareFile | ( | const std::filesystem::path & | file_to_find, |
| std::initializer_list< std::string_view > | extra_paths = {} |
||
| ) |
Attempts to locate a particular file (files supplied with that_terminal).
These directories are searched, in order: arg0_path/share/
$HOME/.local/share/that_terminal/
/home/$USER/.local/share/that_terminal/
/usr/local/share/
/usr/share/ followed by the extra paths, if given.
| file_to_find | Filename to search for |
| extra_paths | Extra paths to search |
| void SaveArg0 | ( | const char * | arg0 | ) |
This function is to be called by main(). It saves the value of argv[0] so that the files can be located in arg0_path/share/.
| arg0 | Value of argv[0] |