1
0
mirror of https://github.com/pgbackrest/pgbackrest.git synced 2025-07-07 00:35:37 +02:00

Storage object improvements.

* Convert all functions to variadic functions.
* Enforce read-only storage.
* Add storageLocalWrite() helper function. Add storageExists(), storagePathCreate(), storageRemove(), and storageStat().
* Add StorageFile object and storageOpenRead()/storageOpenWrite().
This commit is contained in:
David Steele
2018-04-03 12:25:21 -04:00
parent 90f980fe91
commit 93fdb98d15
30 changed files with 1141 additions and 287 deletions

View File

@ -290,7 +290,7 @@ testRun()
// Restore normal stdout
dup2(stdoutSave, STDOUT_FILENO);
Storage *storage = storageNew(strNew(testPath()), 0750, 65536, NULL);
TEST_RESULT_STR(strPtr(strNewBuf(storageGet(storage, stdoutFile, false))), generalHelp, " check text");
Storage *storage = storageNewNP(strNew(testPath()));
TEST_RESULT_STR(strPtr(strNewBuf(storageGetNP(storageOpenReadNP(storage, stdoutFile)))), generalHelp, " check text");
}
}