Package com.sk89q.worldedit.util.io.file
Class ArchiveNioSupports
java.lang.Object
com.sk89q.worldedit.util.io.file.ArchiveNioSupports
-
Method Summary
Modifier and TypeMethodDescriptionstatic ArchiveNioSupport
combined()
Get anArchiveNioSupport
that combines all known instances.static Path
skipRootSameName
(Path root, String name) If root contains a folder with the same name asname
, and no regular files, returns the path to that folder.static Optional<ArchiveDir>
tryOpenAsDir
(Path archive)
-
Method Details
-
tryOpenAsDir
- Throws:
IOException
-
combined
Get anArchiveNioSupport
that combines all known instances.- Returns:
- a combined
ArchiveNioSupport
instance
-
skipRootSameName
If root contains a folder with the same name asname
, and no regular files, returns the path to that folder. Otherwise, return the root path.This method is used to provide equal outputs for archives that do and do not contain their name as part of their root folder.
- Parameters:
root
- the root pathname
- the name that might exist inside root- Returns:
- the corrected path
- Throws:
IOException
-