Package qupath.lib.gui
Class FileCopier
java.lang.Object
qupath.lib.gui.FileCopier
Copy files to an output directory, prompting the user if necessary.
This is intended for interactive use; if there is an exception, the user will be notified by an error message dialog.
- Since:
- v0.5.0
- Author:
- Pete Bankhead
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
doCopy()
Perform the copying.inputFiles
(Collection<File> files) Collection of files to copy.inputPaths
(Collection<Path> paths) Collection of paths representing files to copy.outputPath
(String name) Name of the output directory.outputPath
(Path name) Path representing the output directory.Specify that the copying is relative to the QuPath user directory.Title for any dialog.
-
Constructor Details
-
FileCopier
public FileCopier()
-
-
Method Details
-
title
Title for any dialog.- Parameters:
title
-- Returns:
-
relativeToUserDirectory
Specify that the copying is relative to the QuPath user directory. This is useful if copying files to the user directory itself, or a subdirectory. If this method is called, then the user will be prompted to create a user directory if one does not already exist.- Returns:
-
outputPath
Name of the output directory. IfrelativeToUserDirectory()
is selected, this should be given relative to the QuPath user directory; otherwise, it should be an absolute path.- Parameters:
name
-- Returns:
- See Also:
-
outputPath
Path representing the output directory. IfrelativeToUserDirectory()
is selected, this should be given relative to the QuPath user directory; otherwise, it should be an absolute path.- Parameters:
name
-- Returns:
- See Also:
-
inputFiles
Collection of files to copy.- Parameters:
files
-- Returns:
- See Also:
-
inputPaths
Collection of paths representing files to copy.- Parameters:
paths
-- Returns:
- See Also:
-
doCopy
public void doCopy()Perform the copying. Note that any exceptions will be caught and displayed to the user in an error dialog.
-