Add optional FD parameter to AddEntry()

If a FD is specified, instead of using the file with the given the FD is
used. Allows for adding entries without first copying them into the
directory structure.
This commit is contained in:
Ingo Weinhold
2011-11-25 06:18:45 +01:00
parent cd8f03a8cc
commit 0f9a98a419
4 changed files with 89 additions and 31 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ public:
~BPackageWriter();
status_t Init(const char* fileName);
status_t AddEntry(const char* fileName);
status_t AddEntry(const char* fileName, int fd = -1);
status_t Finish();
private:
@@ -38,7 +38,7 @@ public:
~PackageWriterImpl();
status_t Init(const char* fileName);
status_t AddEntry(const char* fileName);
status_t AddEntry(const char* fileName, int fd = -1);
status_t Finish();
private:
@@ -52,9 +52,9 @@ private:
status_t _Init(const char* fileName);
status_t _Finish();
status_t _RegisterEntry(const char* fileName);
status_t _RegisterEntry(const char* fileName, int fd);
Entry* _RegisterEntry(Entry* parent,
const char* name, size_t nameLength,
const char* name, size_t nameLength, int fd,
bool isImplicit);
status_t _CheckLicenses();