ch.ethz.ssh2.sftp
public class OpenFlags extends java.lang.Object
TODO: This comment should be moved to the open method.
Modifier and Type | Field and Description |
---|---|
static int |
SSH_FXF_ACCESS_APPEND_DATA
Data is always written at the end of the file.
|
static int |
SSH_FXF_ACCESS_APPEND_DATA_ATOMIC
Data is always written at the end of the file.
|
static int |
SSH_FXF_ACCESS_BLOCK_ADVISORY
If this bit is set, the above BLOCK modes are advisory.
|
static int |
SSH_FXF_ACCESS_BLOCK_DELETE
The server MUST guarantee that no other handle has been opened
with ACE4_DELETE access, opened with the
SSH_FXF_ACCESS_DELETE_ON_CLOSE flag set, and that no other handle
will be opened with ACE4_DELETE access or with the
SSH_FXF_ACCESS_DELETE_ON_CLOSE flag set, and that the file itself
is not deleted in any other way until the client closes the handle.
|
static int |
SSH_FXF_ACCESS_BLOCK_READ
The server MUST guarantee that no other handle has been opened
with ACE4_READ_DATA access, and that no other handle will be
opened with ACE4_READ_DATA access until the client closes the
handle.
|
static int |
SSH_FXF_ACCESS_BLOCK_WRITE
The server MUST guarantee that no other handle has been opened
with ACE4_WRITE_DATA or ACE4_APPEND_DATA access, and that no other
handle will be opened with ACE4_WRITE_DATA or ACE4_APPEND_DATA
access until the client closes the handle.
|
static int |
SSH_FXF_ACCESS_DELETE_ON_CLOSE
The file should be deleted when the last handle to it is closed.
|
static int |
SSH_FXF_ACCESS_DISPOSITION
Disposition is a 3 bit field that controls how the file is opened.
|
static int |
SSH_FXF_ACCESS_NOFOLLOW
If the final component of the path is a symlink, then the open
MUST fail, and the error SSH_FX_LINK_LOOP MUST be returned.
|
static int |
SSH_FXF_ACCESS_TEXT_MODE
Indicates that the server should treat the file as text and
convert it to the canonical newline convention in use.
|
static int |
SSH_FXF_CREATE_NEW
A new file is created; if the file already exists, the server
MUST return status SSH_FX_FILE_ALREADY_EXISTS.
|
static int |
SSH_FXF_CREATE_TRUNCATE
A new file is created; if the file already exists, it is opened
and truncated.
|
static int |
SSH_FXF_OPEN_EXISTING
An existing file is opened.
|
static int |
SSH_FXF_OPEN_OR_CREATE
If the file exists, it is opened.
|
static int |
SSH_FXF_TRUNCATE_EXISTING
An existing file is opened and truncated.
|
Constructor and Description |
---|
OpenFlags() |
public static final int SSH_FXF_ACCESS_DISPOSITION
public static final int SSH_FXF_CREATE_NEW
public static final int SSH_FXF_CREATE_TRUNCATE
public static final int SSH_FXF_OPEN_EXISTING
public static final int SSH_FXF_OPEN_OR_CREATE
public static final int SSH_FXF_TRUNCATE_EXISTING
public static final int SSH_FXF_ACCESS_APPEND_DATA
Data is not required to be appended atomically. This means that if multiple writers attempt to append data simultaneously, data from the first may be lost. However, data MAY be appended atomically.
public static final int SSH_FXF_ACCESS_APPEND_DATA_ATOMIC
Data MUST be written atomically so that there is no chance that multiple appenders can collide and result in data being lost.
If both append flags are specified, the server SHOULD use atomic append if it is available, but SHOULD use non-atomic appends otherwise. The server SHOULD NOT fail the request in this case.
public static final int SSH_FXF_ACCESS_TEXT_MODE
When a file is opened with this flag, the offset field in the read and write functions is ignored.
Servers MUST process multiple, parallel reads and writes correctly in this mode. Naturally, it is permissible for them to do this by serializing the requests.
Clients SHOULD use the SSH_FXF_ACCESS_APPEND_DATA flag to append data to a text file rather then using write with a calculated offset.
public static final int SSH_FXF_ACCESS_BLOCK_READ
If there is a conflicting lock the server MUST return SSH_FX_LOCK_CONFLICT. If the server cannot make the locking guarantee, it MUST return SSH_FX_OP_UNSUPPORTED.
Other handles MAY be opened for ACE4_WRITE_DATA or any other combination of accesses, as long as ACE4_READ_DATA is not included in the mask.
public static final int SSH_FXF_ACCESS_BLOCK_WRITE
If there is a conflicting lock the server MUST return SSH_FX_LOCK_CONFLICT. If the server cannot make the locking guarantee, it MUST return SSH_FX_OP_UNSUPPORTED.
Other handles MAY be opened for ACE4_READ_DATA or any other combination of accesses, as long as neither ACE4_WRITE_DATA nor ACE4_APPEND_DATA are included in the mask.
public static final int SSH_FXF_ACCESS_BLOCK_DELETE
If there is a conflicting lock the server MUST return SSH_FX_LOCK_CONFLICT. If the server cannot make the locking guarantee, it MUST return SSH_FX_OP_UNSUPPORTED.
public static final int SSH_FXF_ACCESS_BLOCK_ADVISORY
The server MAY perform mandatory locking even if the BLOCK_ADVISORY bit is set.
public static final int SSH_FXF_ACCESS_NOFOLLOW
public static final int SSH_FXF_ACCESS_DELETE_ON_CLOSE
It is implementation specific whether the directory entry is removed immediately or when the handle is closed.