Zip List Entries

List the contents of a ZIP file

SDK Function

file.zipListContents();

Return Object

ZipListEntry

Authorization Requirement

Available to all authenticated keys or sessions.

Example Request

import com.files.exceptions.*;
import com.files.exceptions.ApiErrorException.*;
import com.files.models.File;
import com.files.models.ZipListEntry;

try {
  HashMap<String, Object> attributes = new HashMap<>();
  File file = new File(attributes);
  file.zipListContents(null);
} catch (NotAuthenticatedException e) {
  System.out.println("Authentication Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
} catch (SdkException e) {
  System.out.println("Unknown Error Occurred (" + e.getClass().getName() + "): " + e.getMessage());
}

The ZipListEntry Object

Some of the functions above return a ZipListEntry object. The attributes of this object are listed below.

AttributeDescription
path
string
Entry path inside the ZIP. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters.
size
int64
Uncompressed size in bytes.