com.ssh.sft
Interface Policies.Copy

All Known Subinterfaces:
Policies.All, Policies.CopyDir, Policies.Move, Policies.MoveDir
All Known Implementing Classes:
AbstractPolicy
Enclosing interface:
Policies

public static interface Policies.Copy

The policy interface for copying files.


Method Summary
 CharConversionfromSource(File src)
           
 booleanoverwrite(File src, File dst)
          Invoked when an existing file is about to be overwritten.
 booleanstart(File src, Location dst)
          Invoked when a file copy operation from src to dst is started.
 CharConversiontoDest(Location dst)
           
 

Method Detail

start

public boolean start(File src,
                     Location dst)
              throws AbortedException
Invoked when a file copy operation from src to dst is started.

Parameters:
src - the path to copy from
dst - the path to copy to
Returns:
true if the operation may proceed, false otherwise
Throws:
AbortedException - if the entire ongoing operation should be aborted

overwrite

public boolean overwrite(File src,
                         File dst)
                  throws AbortedException
Invoked when an existing file is about to be overwritten.

Parameters:
src - the path to the file that is about to overwrite
dst - the path to the file that is about to be overwritten
Returns:
true if overwriting is allowed, false otherwise
Throws:
AbortedException - if the entire ongoing operation should be aborted

fromSource

public CharConversion fromSource(File src)
                          throws AbortedException
Throws:
AbortedException

toDest

public CharConversion toDest(Location dst)
                      throws AbortedException
Throws:
AbortedException