public class CopyFileEvent extends AbstractTransactionEvent
Modifier and Type | Field and Description |
---|---|
private File |
destination |
private File |
source |
Constructor and Description |
---|
CopyFileEvent(File source,
File destination,
List<? extends org.codehaus.plexus.digest.Digester> digesters) |
Modifier and Type | Method and Description |
---|---|
void |
commit()
Commit this event.
|
private boolean |
copyChecksum(String extension)
Copy checksum of source file with extension provided if exists
|
private void |
copyChecksums()
Copy checksums of source file with all digesters if exist
|
void |
rollback()
Rollback the even already committed.
|
createBackup, createChecksums, getDigesterFileExtension, getDigesters, mkDirs, restoreBackup, restoreBackups, revertFilesCreated, revertMkDirs, writeStringToFile
private final File destination
public CopyFileEvent(File source, File destination, List<? extends org.codehaus.plexus.digest.Digester> digesters)
source
- destination
- digesters
- List
<Digester
> digesters to use for checksummingpublic void commit() throws IOException
TransactionEvent
IOException
- if an error occurred committing the changeprivate void copyChecksums() throws IOException
IOException
private boolean copyChecksum(String extension) throws IOException
extension
- IOException
public void rollback() throws IOException
TransactionEvent
IOException
- if an error occurred reverting the changeCopyright © 2006–2023 The Apache Software Foundation. All rights reserved.