2022-10-26 08:02:14 +02:00
|
|
|
/* SPDX-License-Identifier: MIT-0 */
|
2021-10-01 11:44:33 +01:00
|
|
|
|
2020-03-23 20:36:41 +01:00
|
|
|
#include <stdio.h>
|
2021-08-30 16:16:30 +02:00
|
|
|
#include <stdlib.h>
|
2020-03-23 20:36:41 +01:00
|
|
|
#include <sd-path.h>
|
|
|
|
|
|
|
|
int main(void) {
|
2021-08-30 16:16:30 +02:00
|
|
|
int r;
|
2020-03-23 20:36:41 +01:00
|
|
|
char *t;
|
|
|
|
|
2021-08-30 16:16:30 +02:00
|
|
|
r = sd_path_lookup(SD_PATH_USER_DOCUMENTS, NULL, &t);
|
|
|
|
if (r < 0)
|
|
|
|
return EXIT_FAILURE;
|
|
|
|
|
2020-03-23 20:36:41 +01:00
|
|
|
printf("~/Documents: %s\n", t);
|
2021-08-30 16:16:30 +02:00
|
|
|
free(t);
|
|
|
|
|
|
|
|
return EXIT_SUCCESS;
|
2020-03-23 20:36:41 +01:00
|
|
|
}
|