|
wlmaker
|
#include <libbase/libbase.h>

Go to the source code of this file.
Typedefs | |
| typedef struct _wlmaker_files_t | wlmaker_files_t |
Functions | |
| wlmaker_files_t * | wlmaker_files_create (const char *dirname_ptr) |
| void | wlmaker_files_destroy (wlmaker_files_t *files_ptr) |
| char * | wlmaker_files_xdg_config_fname (wlmaker_files_t *files_ptr, const char *fname_ptr) |
| char * | wlmaker_files_xdg_config_find (wlmaker_files_t *files_ptr, const char *fname_ptr, int mode_type) |
Variables | |
| const bs_test_set_t | wlmaker_files_test_set |
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
| typedef struct _wlmaker_files_t wlmaker_files_t |
Handle for files module.
| wlmaker_files_t * wlmaker_files_create | ( | const char * | dirname_ptr | ) |
Create the files module.
| dirname_ptr | Name of a subdirectory, that will be used as a component for each of the XDG paths. |
| void wlmaker_files_destroy | ( | wlmaker_files_t * | files_ptr | ) |
Destroys the file module.
| files_ptr |
| char * wlmaker_files_xdg_config_find | ( | wlmaker_files_t * | files_ptr, |
| const char * | fname_ptr, | ||
| int | mode_type | ||
| ) |
Finds a file (or directory, ...) from XDG configuration directories.
Joins wlmaker_files_t::dirname_ptr with fname_ptr, and then looks for that entity in ${XDG_CONFIG_HOME} and ${XDG_CONFIG_DIRS}. Returns true if the file has mode_type, eg. S_IFREG or S_ISDIR.
| char * wlmaker_files_xdg_config_fname | ( | wlmaker_files_t * | files_ptr, |
| const char * | fname_ptr | ||
| ) |
Returns a full path name for a config file.
This expands into ${XDG_CONFIG_HOME}/*dirname_ptr/*fname_ptr.
| files_ptr | |
| fname_ptr |
|
extern |
Unit test set for wlmaker_files_t.