↳com.parrot.docdown.generator.AssetsDir
Overview
Manages resources asset directory.
Supports getting asserts from a jar or in the classes directorySummary
Fields | |
---|---|
private final ClassLoader | classloader |
private final Path | contentDirPath |
private final Path | destDirPath |
private final Path | srcDirPath |
Constructors | |
---|---|
public | AssetsDir(Path srcPath, Path destPath, Path contentPath, ClassLoader classloader) Constructor |
Methods | |
---|---|
public void | copy() Copy assets files to the output directory. |
private void | copyAssetFileListFromDir(URL assertDirUrl) Copy assets from the classes directory |
private void | copyAssetFileListFromJar(URL assertDirUrl) Copy assets from a jar |
private void | copyDirectoryFiles(Path basePath, Path dir) Deep copy directory files. |
public Path | getPath() Gets the path of copied assets directory. |
from Object |
Fields
private final Path srcDirPath
private final Path destDirPath
private final Path contentDirPath
private final ClassLoader classloader
Constructors
Constructor
Parameters:
srcPath: path of resource directory containing the assets to copy.
destPath: path where to copy the assets.
contentPath: path of the directory to copy.
classloader: classloader to get the resource.
Methods
public Path getPath()
Gets the path of copied assets directory.
Returns:
path of copied assets directory
Copy assets files to the output directory.
private void copyAssetFileListFromJar(URL assertDirUrl)
Copy assets from a jar
Parameters:
assertDirUrl: url of the assets directory
private void copyAssetFileListFromDir(URL assertDirUrl)
Copy assets from the classes directory
Parameters:
assertDirUrl: url of the assets directory
Deep copy directory files.
Parameters:
basePath: base directory containing the directory to copy.
dir: directory to copy