public class HardLinkCopyStrategy extends Object implements FileCopyStrategy
createLink method are satisfied.
If the source file changes after the copy operation has finished, the contents of the target file will change as well but if
the source file is deleted or renamed, the target file will remain unchanged and still existant. Thus this strategy is most
useful for files that never change and are copy-on-write.
The constructor of this strategy will throw an UnsupportedOperationException if the relevant classes or methods
were not found.| Constructor and Description |
|---|
HardLinkCopyStrategy()
Constructs the strategy or throws an exception if the relevant classes or methods are not available :
java.nio.file.Files#createLink(java.nio.file.Path, java.nio.file.Path)
java.io.File#toPath()
|
| Modifier and Type | Method and Description |
|---|---|
void |
copy(File source,
File target)
Copy the file from source to target.
|
public HardLinkCopyStrategy()
UnsupportedOperationException - if the relevant classes or methods were not foundpublic void copy(File source, File target)
FileCopyStrategycopy in interface FileCopyStrategyCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.