Package arc.files
Class ZipFi
java.lang.Object
arc.files.Fi
arc.files.ZipFi
A FileHandle meant for easily representing and reading the contents of a zip/jar file.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns a handle to the child with the specified name.boolean
delete()
Deletes this file or empty directory and returns success.boolean
exists()
Returns true if the file exists.boolean
Returns true if this file is a directory.long
length()
Returns the length in bytes of this file, or 0 if this file is a directory, does not exist, or the size cannot otherwise be determined.Fi[]
list()
Returns the paths to the children of this directory.name()
parent()
path()
read()
Returns a stream for reading this file as bytes.toString()
Methods inherited from class arc.files.Fi
absolutePath, copyFilesTo, copyTo, deleteDirectory, emptyDirectory, emptyDirectory, equals, extension, extEquals, file, findAll, findAll, get, hashCode, lastModified, list, list, list, map, map, mkdirs, moveTo, nameWithoutExtension, pathWithoutExtension, read, readBytes, readBytes, readByteStream, reader, reader, reader, reader, reads, readsDeflate, readString, readString, seq, sibling, tempDirectory, tempFile, type, walk, write, write, write, write, writeBytes, writeBytes, writeBytes, writePng, writer, writer, writes, writes, writesDeflate, writeString, writeString, writeString
-
Constructor Details
-
ZipFi
-
-
Method Details
-
delete
public boolean delete()Description copied from class:Fi
Deletes this file or empty directory and returns success. Will not delete a directory that has children. -
exists
public boolean exists()Description copied from class:Fi
Returns true if the file exists. On Android, aFiles.classpath(java.lang.String)
orFiles.internal(java.lang.String)
handle to a directory will always return false. Note that this can be very slow for internal files on Android! -
child
Description copied from class:Fi
Returns a handle to the child with the specified name. -
name
-
path
-
parent
-
list
Description copied from class:Fi
Returns the paths to the children of this directory. Returns an empty list if this file handle represents a file and not a directory. On the desktop, anFiles.internal(java.lang.String)
handle to a directory on the classpath will return a zero length array. -
isDirectory
public boolean isDirectory()Description copied from class:Fi
Returns true if this file is a directory. Always returns false for classpath files. On Android, anFiles.internal(java.lang.String)
handle to an empty directory will return false. On the desktop, anFiles.internal(java.lang.String)
handle to a directory on the classpath will return false.- Overrides:
isDirectory
in classFi
-
read
Description copied from class:Fi
Returns a stream for reading this file as bytes. -
length
public long length()Description copied from class:Fi
Returns the length in bytes of this file, or 0 if this file is a directory, does not exist, or the size cannot otherwise be determined. -
toString
-