Package jmri.jmrit.ctc
Class CTCFiles
java.lang.Object
jmri.jmrit.ctc.CTCFiles
CTC File utility
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringaddExtensionIfMissing(String path, String missingExtension) static StringchangeExtensionTo(String path, String newExtension) static booleanstatic booleandeleteFile(String fileName) static booleanfileExists(String fileName) static FileVerify that the standard file path is valid.static Stringstatic StringgetFilenameOnly(String path) static StringgetFullName(String fileName) Create the full file name with pathstatic StringremoveFileExtension(String filename) static booleanrenameFile(String oldFileName, String newFileName, boolean replace)
-
Constructor Details
-
CTCFiles
public CTCFiles()
-
-
Method Details
-
getFile
Verify that the standard file path is valid. Create the ctc directory if needed.- Parameters:
fileName- The name of the file- Returns:
- the requested file object or null if the path is not valid.
-
getFileLocation
-
getFullName
Create the full file name with path- Parameters:
fileName- The name of the file.- Returns:
- the full path and name.
-
fileExists
-
copyFile
-
renameFile
-
deleteFile
-
addExtensionIfMissing
-
changeExtensionTo
-
removeFileExtension
-
getFilenameOnly
-