1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2024-12-14 10:13:05 +02:00
pgbackrest/libc/xs/storage/storage.xs
David Steele 4744eb9387 Add storagePathRemove() and use it in the Perl Posix driver.
This implementation should be faster because it does not stat each file.  It simply assumes that most directory entries are files so attempts an unlink() first.  If the entry is reported by error codes to be a directory then it attempts an rmdir().
2018-04-11 08:21:09 -04:00

19 lines
757 B
Plaintext

# ----------------------------------------------------------------------------------------------------------------------------------
# Storage Exports
# ----------------------------------------------------------------------------------------------------------------------------------
MODULE = pgBackRest::LibC PACKAGE = pgBackRest::LibC
####################################################################################################################################
void
storageDriverPosixPathRemove(path, errorOnMissing, recurse)
const char *path
bool errorOnMissing
bool recurse
CODE:
MEM_CONTEXT_XS_TEMP_BEGIN()
{
storageDriverPosixPathRemove(strNew(path), errorOnMissing, recurse);
}
MEM_CONTEXT_XS_TEMP_END();