---
name: "synce_get_directory"
section: "3"
platform: "linux"
package: "libsynce0-dev"
version: "0.15-1.1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/synce_get_directory"
---

# synce\_get\_directory(3)

get synce configuration directory

## NAME

synce\_get\_directory - get synce configuration directory

## SYNOPSIS

```
#include <synce.h>

bool synce_get_directory(char ** path);

bool synce_get_subdirectory(const char * name, char ** path);

bool synce_get_script_directory(char ** path);
```

## DESCRIPTION

The **synce\_get\_directory**() function provides a string describing the location of the synce configuration directory. If the environment variable **SYNCE\_CONF\_DIR** is set, it's value is returned. The default location is ~/.synce.

The **synce\_get\_subdirectory**() function provides a string describing the location of the subdirectory **name** in the synce configuration directory. **name** cannot contain '/'.

The **synce\_get\_script\_directory**() function provides a string describing the location of the script subdirectory in the synce configuration directory.

## RETURN VALUE

Returns true if successful. Fails and returns false if **path** is an invalid pointer, **SYNCE\_CONF\_DIR** is not set and user cannot be determined, or the directory does not exist.

## SEE ALSO

[**synce**(7)](/synce/7.md)
