class SwiftDefaultCopyFeature implements Copy {

    @Override
    public Path copy(final Path source, final Path target, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {
        try {
            // Copies file
            // If segmented file, copies manifest (creating a link between new object and original segments)
            // Use with caution.
            session.getClient().copyObject(regionService.lookup(source),
                containerService.getContainer(source).getName(), containerService.getKey(source),
                containerService.getContainer(target).getName(), containerService.getKey(target));
            // Copy original file attributes
            return new Path(target.getParent(), target.getName(), target.getType(), new PathAttributes(source.attributes()));
        }
        catch(GenericException e) {
            throw new SwiftExceptionMappingService().map("Cannot copy {0}", e, source);
        }
        catch(IOException e) {
            throw new DefaultIOExceptionMappingService().map("Cannot copy {0}", e, source);
        }
    }

    public  SwiftDefaultCopyFeature(final SwiftSession session);
    public  SwiftDefaultCopyFeature(final SwiftSession session, final SwiftRegionService regionService);

}