Class CTCFiles


  • public class CTCFiles
    extends java.lang.Object
    CTC File utility
    • Constructor Summary

      Constructors 
      Constructor Description
      CTCFiles()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String addExtensionIfMissing​(java.lang.String path, java.lang.String missingExtension)  
      static java.lang.String changeExtensionTo​(java.lang.String path, java.lang.String newExtension)  
      static boolean copyFile​(java.lang.String sourceFileName, java.lang.String destFileName, boolean replace)  
      static boolean deleteFile​(java.lang.String fileName)  
      static boolean fileExists​(java.lang.String fileName)  
      static java.io.File getFile​(java.lang.String fileName)
      Verify that the standard file path is valid.
      static java.lang.String getFileLocation()  
      static java.lang.String getFilenameOnly​(java.lang.String path)  
      static java.lang.String getFullName​(java.lang.String fileName)
      Create the full file name with path
      static java.lang.String removeFileExtension​(java.lang.String filename)  
      static boolean renameFile​(java.lang.String oldFileName, java.lang.String newFileName, boolean replace)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getFile

        public static java.io.File getFile​(java.lang.String fileName)
        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.
      • getFullName

        public static java.lang.String getFullName​(java.lang.String fileName)
        Create the full file name with path
        Parameters:
        fileName - The name of the file.
        Returns:
        the full path and name.
      • fileExists

        public static boolean fileExists​(java.lang.String fileName)
      • copyFile

        public static boolean copyFile​(java.lang.String sourceFileName,
                                       java.lang.String destFileName,
                                       boolean replace)
      • renameFile

        public static boolean renameFile​(java.lang.String oldFileName,
                                         java.lang.String newFileName,
                                         boolean replace)
      • deleteFile

        public static boolean deleteFile​(java.lang.String fileName)
      • addExtensionIfMissing

        public static java.lang.String addExtensionIfMissing​(java.lang.String path,
                                                             java.lang.String missingExtension)
      • changeExtensionTo

        public static java.lang.String changeExtensionTo​(java.lang.String path,
                                                         java.lang.String newExtension)
      • removeFileExtension

        public static java.lang.String removeFileExtension​(java.lang.String filename)
      • getFilenameOnly

        public static java.lang.String getFilenameOnly​(java.lang.String path)