PMDK man page

pmemset_source_from_temporary

NAME
SYNOPSIS
DESCRIPTION
RETURN VALUE
ERRORS
SEE ALSO

NAME

pmemset_source_from_temporaryU()/pmemset_source_from_temporaryW()

SYNOPSIS

#include <libpmemset.h>

int pmemset_source_from_temporaryU(struct pmemset_source **src, const char const char *dir);
int pmemset_source_from_temporaryW(struct pmemset_source **src, const wchar_t const char *dir);

DESCRIPTION

pmemset_source_from_temporaryU()/pmemset_source_from_temporaryW() function instantiates a new struct pmemset_source** object describing the data source and creates a unnamed temporary file in the provided directory *dir. The temporary file is always created with mode 0600, and the dir must specify an existing directory name. The created file has size 0 and is extended dynamically based on required part size during pmemset_part_map(3).

In case of source from temporary file the pmemset_source_delete(3) function frees *src and sets *src to NULL and closes the temporary file as a result the file is immediately deleted.

RETURN VALUE

The pmemset_source_from_temporaryU()/pmemset_source_from_temporaryW() function return 0 on success or negative error code on failure.

ERRORS

The pmemset_source_from_temporaryU()/pmemset_source_from_temporaryW() can fail with the following errors:

SEE ALSO

pmemset_part_map(3), pmemset_source_delete(3), libpmemset(7) and http://pmem.io