1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-30 14:55:37 +03:00
systemd/man/path-documents.c

20 lines
305 B
C
Raw Normal View History

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