Package com.spotify.zoltar.fs
Class FileSystemExtras
- java.lang.Object
-
- com.spotify.zoltar.fs.FileSystemExtras
-
public final class FileSystemExtras extends Object
FileSystem utils and extras.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static URI
downloadIfNonLocal(URI path)
If the path is not on a local filesystem, it will download the resource to a temporary path on the local filesystem.static Optional<String>
getLatestDate(String src)
Finds the latest date directory in the directory src.static Path
path(URI uri)
-
-
-
Method Detail
-
getLatestDate
public static Optional<String> getLatestDate(String src) throws IOException
Finds the latest date directory in the directory src. It assumes that partitions are formatted using ISO_LOCAL_DATE (e.g. YYYY-MM-DD).- Throws:
IOException
-
path
public static Path path(URI uri) throws IOException
- Throws:
IOException
-
downloadIfNonLocal
public static URI downloadIfNonLocal(URI path) throws IOException
If the path is not on a local filesystem, it will download the resource to a temporary path on the local filesystem.NOTE: Zoltar internal use only!
- Throws:
IOException
-
-