GNU Radio C++ API Reference 3.10.12.0
The Free & Open Software Radio Ecosystem
 
Loading...
Searching...
No Matches
sys_paths.h
Go to the documentation of this file.
1/*
2 * Copyright 2011,2013 Free Software Foundation, Inc.
3 * Copyright 2024 mboersch, Marcus Müller
4 *
5 * This file is part of GNU Radio
6 *
7 * SPDX-License-Identifier: GPL-3.0-or-later
8 *
9 */
10
11#ifndef GR_SYS_PATHS_H
12#define GR_SYS_PATHS_H
13
14#include "api.h"
15#include <gnuradio/api.h>
16#include <filesystem>
17
18namespace gr {
19namespace paths {
20/*! \brief directory to create temporary files.
21 *
22 * On UNIX-oid systems, typically /tmp.
23 */
24GR_RUNTIME_API std::filesystem::path tmp();
25
26/*! \brief directory that stores user data; typicall $HOME
27 */
28GR_RUNTIME_API std::filesystem::path appdata();
29
30/*! \brief directory that stores configuration.
31 *
32 * Defaults to $XDG_CONFIG_HOME/gnuradio (fallback: appdata()/.config/gnuradio), but if
33 * that doesn't exist, checks the legacy path, appdata()/.gnuradio
34 */
35GR_RUNTIME_API std::filesystem::path userconf();
36
37/*! \brief directory to store non-portable caches (e.g. FFTW wisdom)
38 *
39 * Defaults to $XDG_CACHE_HOME, falls back to appdata()/cache
40 */
41GR_RUNTIME_API std::filesystem::path cache();
42
43/*! \brief directory to store persistent application state (e.g. window layouts, generated
44 * GRC hier blocks)
45 */
46
47GR_RUNTIME_API std::filesystem::path persistent();
48} /* namespace paths */
49
50//! directory to create temporary files
51[[deprecated("use gr::paths::tmp()")]] GR_RUNTIME_API const char* tmp_path();
52
53//! directory to store application data
54[[deprecated("use gr::paths::appdata()")]] GR_RUNTIME_API const char* appdata_path();
55
56//! directory to store user configuration
57[[deprecated("use gr::paths::userconf()")]] GR_RUNTIME_API const char* userconf_path();
58
59} /* namespace gr */
60
61#endif /* GR_SYS_PATHS_H */
#define GR_RUNTIME_API
Definition gnuradio-runtime/include/gnuradio/api.h:18
GR_RUNTIME_API std::filesystem::path tmp()
directory to create temporary files.
GR_RUNTIME_API std::filesystem::path appdata()
directory that stores user data; typicall $HOME
GR_RUNTIME_API std::filesystem::path userconf()
directory that stores configuration.
GR_RUNTIME_API std::filesystem::path persistent()
directory to store persistent application state (e.g. window layouts, generated GRC hier blocks)
GR_RUNTIME_API std::filesystem::path cache()
directory to store non-portable caches (e.g. FFTW wisdom)
GNU Radio logging wrapper.
Definition basic_block.h:29
GR_RUNTIME_API const char * appdata_path()
directory to store application data
GR_RUNTIME_API const char * tmp_path()
directory to create temporary files
GR_RUNTIME_API const char * userconf_path()
directory to store user configuration