@Test public void readEmptyZip() throws Exception { File zipFile = new File(mTemporaryFolder.getRoot(), "foo"); Closer closer = Closer.create(); try { ZFile zf = closer.register(new ZFile(zipFile)); zf.close(); } catch (Throwable t) { throw closer.rethrow(t); } finally { closer.close(); } ImmutableMap<RelativeFile, FileStatus> set = IncrementalRelativeFileSets.fromZip(zipFile); assertEquals(0, set.size()); }
@NonNull public static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip) throws IOException { return fromZip(zip, FileStatus.NEW); }
IncrementalRelativeFileSets { @NonNull public static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip) throws IOException { return fromZip(zip, FileStatus.NEW); } }
IncrementalRelativeFileSets { @NonNull public static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip) throws IOException { return fromZip(zip, FileStatus.NEW); } private  IncrementalRelativeFileSets(); }
IncrementalRelativeFileSets { @NonNull public static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip) throws IOException { return fromZip(zip, FileStatus.NEW); } private  IncrementalRelativeFileSets(); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromDirectory(@NonNull File directory); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip,
            FileStatus status); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip,
            @NonNull FileCacheByPath cache); @NonNull static ImmutableMap<RelativeFile, FileStatus> union(
            @NonNull Iterable<ImmutableMap<RelativeFile, FileStatus>> sets); static int getBaseDirectoryCount(@NonNull ImmutableMap<RelativeFile, FileStatus> set); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZipsAndDirectories(
            @NonNull Iterable<File> files); @NonNull static ImmutableMap<RelativeFile, FileStatus> makeFromBaseFiles(
            @NonNull Collection<File> baseFiles,
            @NonNull Map<File, FileStatus> updates,
            @NonNull FileCacheByPath cache); }
IncrementalRelativeFileSets { @NonNull public static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip) throws IOException { return fromZip(zip, FileStatus.NEW); } private  IncrementalRelativeFileSets(); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromDirectory(@NonNull File directory); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip,
            FileStatus status); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZip(@NonNull File zip,
            @NonNull FileCacheByPath cache); @NonNull static ImmutableMap<RelativeFile, FileStatus> union(
            @NonNull Iterable<ImmutableMap<RelativeFile, FileStatus>> sets); static int getBaseDirectoryCount(@NonNull ImmutableMap<RelativeFile, FileStatus> set); @NonNull static ImmutableMap<RelativeFile, FileStatus> fromZipsAndDirectories(
            @NonNull Iterable<File> files); @NonNull static ImmutableMap<RelativeFile, FileStatus> makeFromBaseFiles(
            @NonNull Collection<File> baseFiles,
            @NonNull Map<File, FileStatus> updates,
            @NonNull FileCacheByPath cache);  }