Package io.github.erdos.stencil.impl
Class FileHelper
java.lang.Object
io.github.erdos.stencil.impl.FileHelper
File handling utilities.
 Some methods may be called from Clojure core.
- 
Method SummaryModifier and TypeMethodDescriptionstatic FilecreateNonexistentTempFile(File parent, String prefix, String suffix) static FilecreateNonexistentTempFile(String prefix, String suffix) Creates a temporary file that is guaranteed not to exist on file system.static Stringstatic Stringstatic voidforceDelete(File file) Recursively deletes a directory or a file.static voidforceMkdir(File directory) Creates a directory.static StringReturns file name without extension part.
- 
Method Details- 
extension
- 
extension
- 
removeExtensionReturns file name without extension part.- Returns:
- simple file name without extension.
- Throws:
- NullPointerException- the input is null
 
- 
createNonexistentTempFileCreates a temporary file that is guaranteed not to exist on file system.- Parameters:
- prefix- file name starts with this file
- suffix- file name ends with this file
- Returns:
- a new file object pointing to a non-existing file in temp directory.
 
- 
createNonexistentTempFile
- 
forceMkdirCreates a directory. Recursively creates parent directories too.- Parameters:
- directory- not null dir to create
- Throws:
- IOException- on IO error
- IllegalArgumentException- when input is null or already exists
 
- 
forceDeleteRecursively deletes a directory or a file.- Parameters:
- file- to delete, not null
- Throws:
- NullPointerException- on null or invalid file
 
 
-