class ResumeFilter extends AbstractUploadFilter {

    @Override
    public TransferStatus prepare(final Path file, final Local local, final TransferStatus parent, final ProgressListener progress) throws BackgroundException {
        final TransferStatus status = super.prepare(file, local, parent, progress);
        if(file.isFile()) {
            if(parent.isExists()) {
                final Write.Append append = upload.append(file, status.getLength(), cache);
                if(append.append && append.size < local.attributes().getSize()) {
                    // Append to existing file
                    status.setAppend(true);
                    status.setLength(status.getLength() - append.size);
                    status.setOffset(append.size);
                    // Disable use of temporary target when resuming upload
                    status.rename((Path) null);
                }
            }
        }
        return status;
    }

    public  ResumeFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session);
    public  ResumeFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session,
                        final UploadFilterOptions options);
    public  ResumeFilter(final SymlinkResolver<Local> symlinkResolver, final Session<?> session,
                        final UploadFilterOptions options, final Upload upload);

}