mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Add gzip to RepoStore interface
This commit is contained in:
parent
8496871ab2
commit
1c81fcf501
1 changed files with 28 additions and 0 deletions
|
@ -50,6 +50,22 @@ public interface RepoStore {
|
|||
return bzip2Project(projectName, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Tars and gzips the .git directory of the given project. Throws an
|
||||
* IOException if the project doesn't exist. The returned stream is a copy
|
||||
* of the original .git directory, which must be deleted using remove().
|
||||
*/
|
||||
InputStream gzipProject(
|
||||
String projectName,
|
||||
long[] sizePtr
|
||||
) throws IOException;
|
||||
|
||||
default InputStream gzipProject(
|
||||
String projectName
|
||||
) throws IOException {
|
||||
return gzipProject(projectName, null);
|
||||
}
|
||||
|
||||
void gcProject(String projectName) throws IOException;
|
||||
|
||||
/**
|
||||
|
@ -73,4 +89,16 @@ public interface RepoStore {
|
|||
InputStream dataStream
|
||||
) throws IOException;
|
||||
|
||||
/**
|
||||
* Ungzips the given data stream into a .git directory for projectName.
|
||||
* Creates the project's git directory.
|
||||
* If projectName already exists, throws an IOException.
|
||||
* @param projectName the name of the project, e.g. abc123
|
||||
* @param dataStream the data stream containing the gzip contents.
|
||||
*/
|
||||
void ungzipProject(
|
||||
String projectName,
|
||||
InputStream dataStream
|
||||
) throws IOException;
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue