Package org.jlab.utils.system
Class ClasUtilsFile
java.lang.Object
org.jlab.utils.system.ClasUtilsFile
- Author:
- gavalian
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringcreateFileName(String filename, String addition, boolean preservePath) returns a new file name which is composed of the file name given and then by adding given string to it. if flag preservePath is true, then file name will have the same path as the original file name.getFileList(String directory) returns list of files in the directory. absolute path is given.getFileList(String env, String rpath) returns list of files in the directory defined by environment variable and a relative path.getFileList(String env, String rpath, String ext) returns a file list that contains files with given extensiongetFileNamesRelative(List<String> files) Returs relative paths of file names from list of absolute paths.static StringgetName()static StringgetResourceDir(String env, String rpath) returns package resource directory with given enviromental variable and relative path.static voidstatic voidprints a log message with the module name included.Reads a text file into a list of stringsstatic StringreadFileString(String filename) Reads a text file into one string.static void
- 
Constructor Details- 
ClasUtilsFilepublic ClasUtilsFile()
 
- 
- 
Method Details- 
getName
- 
printLogprints a log message with the module name included.- Parameters:
- log-
 
- 
getResourceDirreturns package resource directory with given enviromental variable and relative path.- Parameters:
- env-
- rpath-
- Returns:
 
- 
getFileListreturns list of files in the directory. absolute path is given. This function will not exclude ".*" and "*~" files.- Parameters:
- directory-
- Returns:
 
- 
getFileListreturns list of files in the directory defined by environment variable and a relative path.- Parameters:
- env-
- rpath-
- Returns:
 
- 
getFileListreturns a file list that contains files with given extension- Parameters:
- env-
- rpath-
- ext-
- Returns:
 
- 
writeFile
- 
readFileReads a text file into a list of strings- Parameters:
- filename-
- Returns:
 
- 
readFileStringReads a text file into one string.- Parameters:
- filename-
- Returns:
 
- 
getFileNamesRelativeReturs relative paths of file names from list of absolute paths.- Parameters:
- files-
- Returns:
 
- 
createFileNamereturns a new file name which is composed of the file name given and then by adding given string to it. if flag preservePath is true, then file name will have the same path as the original file name.- Parameters:
- filename-
- addition-
- preservePath-
- Returns:
 
- 
main
 
-