Package ml.karmaconfigs.api.common
Class ResourceDownloader
java.lang.Object
ml.karmaconfigs.api.common.ResourceDownloader
Karma resource downloader
-
Constructor Summary
ConstructorsConstructorDescriptionResourceDownloader(File destination, String _url)Initialize the resource downloader -
Method Summary
Modifier and TypeMethodDescriptionvoiddownload()Download the resourceGet the resource destination filestatic ResourceDownloadertoCache(KarmaSource source, String fileName, String downloadURL, String... sub)Download something to cache
-
Constructor Details
-
ResourceDownloader
Initialize the resource downloader- Parameters:
destination- the resource destination_url- the resource download URL
-
-
Method Details
-
toCache
public static ResourceDownloader toCache(KarmaSource source, String fileName, String downloadURL, String... sub)Download something to cache- Parameters:
source- the resource sourcefileName- the destination file namedownloadURL- the resource download URLsub- the resource path- Returns:
- a new resource download instance
-
download
public void download()Download the resource -
getDestFile
Get the resource destination file- Returns:
- the resource destination file
-