Modifier and Type | Class and Description |
---|---|
static class |
FileRemoteCmdEventData.Cmd |
Modifier and Type | Field and Description |
---|---|
private FileRemoteWalkerCallback |
callback |
private FileRemoteCmdEventData.Cmd |
cmd
The command to execute with this cmd event payload.
|
private int |
cycleProgress
Milliseconds for cycle or specific determined progress event:
0= progress event for any file and directory entry. |
private int |
depthWalk
Depths to walk in dir tree, 0: all.
|
private FileRemote |
filedst
Source and destination files for copy, rename, move or the only one filesrc. filedst may remain null then.
|
private FileRemote |
filesrc
Source and destination files for copy, rename, move or the only one filesrc. filedst may remain null then.
|
private int |
markSet
Bits to mark files while walking through.
|
private int |
markSetDir
Bits to mark files while walking through.
|
(package private) int |
maskFlags
For
FileRemoteCmdEventData.Cmd.chgProps : new properties with bit designation see FileRemote.flags . |
private int |
modeCopyOper
Mode of operation, see
FileRemote.modeCopyCreateAsk etc. |
private java.lang.String |
nameDst
Designation of destination file names maybe wildcard mask.
|
private java.lang.String |
namesSrc
List of names separated with ':' or " : " or empty.
|
(package private) long |
newDate
For
FileRemoteCmdEventData.Cmd.chgProps : A new time stamp. |
(package private) int |
newFlags
For
FileRemoteCmdEventData.Cmd.chgProps : new properties with bit designation see FileRemote.flags . |
private java.lang.String |
newName
For
FileRemoteCmdEventData.Cmd.chgProps : a new name. |
private java.lang.String |
selectFilter
Wildcard mask to select source files.
|
private int |
selectMask
Bits to select from mark.
|
private static long |
serialVersionUID |
Constructor and Description |
---|
FileRemoteCmdEventData()
Creates the payload of a command event
|
Modifier and Type | Method and Description |
---|---|
FileRemoteWalkerCallback |
callback() |
FileRemoteCmdEventData |
clean()
Common operation to clean the content.
|
FileRemoteCmdEventData.Cmd |
cmd() |
int |
cycleProgress() |
int |
depthWalk() |
boolean |
deserialize(byte[] data)
Opposite operation, reads the serialized content and restore the Java content.
|
FileRemote |
filedst() |
FileRemote |
filesrc() |
int |
markSet() |
int |
markSetDir() |
int |
maskFlags() |
int |
modeCopyOper() |
long |
newDate() |
int |
newFlags() |
java.lang.String |
newName() |
java.lang.String |
selectFilter() |
int |
selectMask() |
byte[] |
serialize()
Converts to dedicated bytes which presents the content.
|
void |
setCallback(FileRemoteWalkerCallback callback) |
void |
setCmdChgFileRemote(FileRemote file,
FileRemoteCmdEventData.Cmd cmd,
FileRemote fileDst,
java.lang.String nameNew,
long dateNew)
Sets the command and data for changing a file in a remote file system.
|
void |
setCmdWalkLocal(FileRemote srcdir,
FileRemoteCmdEventData.Cmd cmd,
FileRemote dstdir,
int markSet,
int markSetDir,
java.lang.String selectFilter,
int selectMask,
int depthWalk,
FileRemoteWalkerCallback callback,
int cycleProgress)
Sets the command and data for walk through the file system on a local device in the same data space.
|
void |
setCmdWalkRemote(FileRemote srcdir,
FileRemoteCmdEventData.Cmd cmd,
FileRemote dstdir,
java.lang.String selectFilter,
int cycleProgress,
int depthWalk)
Sets the command and data for walk through the file system for remote access.
|
private static final long serialVersionUID
private FileRemoteCmdEventData.Cmd cmd
private int cycleProgress
private FileRemote filesrc
private FileRemote filedst
private java.lang.String namesSrc
private int markSet
private int markSetDir
private java.lang.String selectFilter
private int selectMask
FileMark.orWithSelectString
, FileMark.ignoreSymbolicLinks
private int depthWalk
private java.lang.String nameDst
private int modeCopyOper
FileRemote.modeCopyCreateAsk
etc.private java.lang.String newName
FileRemoteCmdEventData.Cmd.chgProps
: a new name.int maskFlags
FileRemoteCmdEventData.Cmd.chgProps
: new properties with bit designation see FileRemote.flags
.
maskFlags contains bits which properties should change, newFlags contains the value of that bit.int newFlags
FileRemoteCmdEventData.Cmd.chgProps
: new properties with bit designation see FileRemote.flags
.
maskFlags contains bits which properties should change, newFlags contains the value of that bit.long newDate
FileRemoteCmdEventData.Cmd.chgProps
: A new time stamp.private FileRemoteWalkerCallback callback
public FileRemoteCmdEventData()
public void setCmdWalkRemote(FileRemote srcdir, FileRemoteCmdEventData.Cmd cmd, FileRemote dstdir, java.lang.String selectFilter, int cycleProgress, int depthWalk)
callback
cannot be given here, it should be organized in the remote device.
It is consequently to do so also if it is executed only in another thread on the same device.srcdir
- the directory which is used for walk through as base or start directory.cmd
- command to execute. It determines what is done with the file. Only specific commands are admissible.dstdir
- the directory which is used as destination due to the cmd.selectFilter
- A filter for the sub dir and filescycleProgress
- for the callback event to inform about progressdepthWalk
- public void setCmdChgFileRemote(FileRemote file, FileRemoteCmdEventData.Cmd cmd, FileRemote fileDst, java.lang.String nameNew, long dateNew)
file
- cmd
- public void setCmdWalkLocal(FileRemote srcdir, FileRemoteCmdEventData.Cmd cmd, FileRemote dstdir, int markSet, int markSetDir, java.lang.String selectFilter, int selectMask, int depthWalk, FileRemoteWalkerCallback callback, int cycleProgress)
srcdir
- cmd
- dstdir
- markSet
- markSetDir
- selectFilter
- selectMask
- depthWalk
- callback
- It can be given if the cmd has not an own callback.cycleProgress
- determines the time of sending the progress event. -1 = never, 0=on any file, >0 is milliseconds.public FileRemoteCmdEventData.Cmd cmd()
public final FileRemote filesrc()
public final FileRemote filedst()
public FileRemoteWalkerCallback callback()
public void setCallback(FileRemoteWalkerCallback callback)
public int markSet()
public int markSetDir()
public java.lang.String selectFilter()
public int selectMask()
public int cycleProgress()
public int depthWalk()
public final int modeCopyOper()
public final java.lang.String newName()
public final int maskFlags()
public final int newFlags()
public final long newDate()
public FileRemoteCmdEventData clean()
Payload
public byte[] serialize()
Payload
Serializable
interface.
This is another approach.public boolean deserialize(byte[] data)
Payload
deserialize
in interface Payload