org.autoplot.Util

Util( )


logger


addFonts

addFonts( ) → void

this will add the Scheme and other named fonts found in the /resources/ folder.

Returns:

void (returns nothing)

[search for examples] [view on GitHub] [view on old javadoc] [view source]


copyFile

copyFile( java.io.File srcf, java.io.File dstf ) → boolean

copy a file. This will probably always returns true or an exception, but check the status to be sure.

Parameters

srcf - the source file
dstf - the destination file

Returns:

true if successful.

[search for examples] [view on GitHub] [view on old javadoc] [view source]


copyFileTree

copyFileTree( java.io.File root, java.io.File dst ) → boolean

copy a branch of files and folders.

Parameters

root - root folder.
dst - destination folder.

Returns:

true if successful.

[search for examples] [view on GitHub] [view on old javadoc] [view source]

copyFileTree( java.io.File root, java.io.File dst, ProgressMonitor mon ) → boolean
copyFileTree( java.io.File root, java.io.File dst, int depth, ProgressMonitor mon ) → boolean

deleteFileTree

deleteFileTree( java.io.File root ) → boolean

deletes all files and folders below root, and root, just as "rm -r" would. TODO: check links

Parameters

root - the root of the tree.

Returns:

true if the operation was successful.

See Also:

pruneFileTree(java.io.File, java.util.List) which probably does the same thing.


[search for examples] [view on GitHub] [view on old javadoc] [view source]


getBuildInfos

getBuildInfos( ) → List

searches class path for META-INF/version.txt, returns nice strings

Returns:

one line per jar

[search for examples] [view on GitHub] [view on old javadoc] [view source]


getBuildTime

getBuildTime( ) → String

return the build time an an ISO8601 time, or "????" if it is unknown. Note question marks are used intentionally so sloppy codes can assume that ???? means the current version of the code built in a debugger.

Returns:

ISO8601 time or "????"

[search for examples] [view on GitHub] [view on old javadoc] [view source]


pruneFileTree

pruneFileTree( java.io.File root, java.util.List problems ) → boolean

remove empty branches from file tree. This is like "rm -r $root"

Parameters

root - the root directory from which to start a search.
problems - any files which could not be deleted are listed here.

Returns:

true if successful.

See Also:

deleteFileTree(java.io.File) which probably does the same thing.


[search for examples] [view on GitHub] [view on old javadoc] [view source]


strjoin

strjoin( java.util.Collection c, String delim ) → String

this will be replaced in Java 8.

Parameters

c - a java.util.Collection
delim - a String

Returns:

a String

[search for examples] [view on GitHub] [view on old javadoc] [view source]