1
0
mirror of https://github.com/systemd/systemd synced 2024-07-08 20:15:55 +00:00
systemd/man/path-documents.c

20 lines
311 B
C
Raw Normal View History

/* SPDX-License-Identifier: MIT-0 */
2020-03-23 19:36:41 +00:00
#include <stdio.h>
#include <stdlib.h>
2024-04-02 19:22:36 +00:00
#include <systemd/sd-path.h>
2020-03-23 19:36:41 +00:00
int main(void) {
int r;
2020-03-23 19:36:41 +00:00
char *t;
r = sd_path_lookup(SD_PATH_USER_DOCUMENTS, NULL, &t);
if (r < 0)
return EXIT_FAILURE;
2020-03-23 19:36:41 +00:00
printf("~/Documents: %s\n", t);
free(t);
return EXIT_SUCCESS;
2020-03-23 19:36:41 +00:00
}