Package com.amalgamasimulation.utils
Interface FileUtils
public interface FileUtils
-
Method Summary
Static MethodsModifier and TypeMethodDescriptionstatic booleanisWritable(String filePath) Checks if the specified file path can be written to.
-
Method Details
-
isWritable
Checks if the specified file path can be written to.The method logic is OS-dependent. On Windows, a (possibly existing) file is considered writable if a new
FileOutputStreamcan be opened for it. On other operating systems (Linux, MacOS), a file is considered writable if it does not exist.- Parameters:
filePath- full path to the file- Returns:
trueif the file can be written using the specified path;falseotherwise
-