| Modifier and Type | Field and Description |
|---|---|
| public static final Map | |
| private static final Pattern |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static int | Returns: A mask encoding the file / folder's attributestrue if this is a normal filetrue if this is a directorytrue if this is a symbolic linkThe file / folder's access perms)PosixFilePermissionsConverts a file / folder's attributes into a mask |
| public static AclEntry | |
| public static SftpClient. | Returns: attrsAttributes to complete, if necessaryto use to find missing information, may be longName)null or empty.Fills in missing information in the attributes if an SFTP v3 long name is available. |
| public static AclEntryType | |
| public static Set | |
| public static Set | |
| public static List | |
| public static int | Returns: The equivalentACE_SYSTEM_xxx_TYPE or negative if null or unknown typeThe type)AclEntryTypeReturns the equivalent SFTP value for the ACL type |
| public static long | |
| public static long | |
| public static <B extends Buffer> B | |
| public static int | Returns: the file typecharacter to convert ch)Converts a POSIX/Linux file type indicator (as if obtained by "ls -l") to a file type. |
| public static int | Returns: The matching POSIX permission mask valueFile type - see type)SSH_FILEXFER_TYPE_xxx valuesConverts a file type into a POSIX permission mask value |
| public static boolean | |
| public static Boolean | Returns: The indicator value -null if none retrievedThe buffer, int Buffer to retrieve the data fromThe SFTP version being used version)Retrieves the end-of-file indicator for |
| public static Boolean | Returns: The indicator value -null if none retrievedThe buffer, int Buffer to retrieve the data fromThe SFTP version being used version)Retrieves the end-of-list indicator for |
| public static String | getLongName(String
The short file name - can also be "." or ".." shortName, Map<String, ?> The file's attributes - e.g., size, owner, permissions, etc. attributes)Creates an "ls -l" compatible long name string |
| public static Boolean | Returns: The actual indicator value used -null if none appendedThe buffer, int Buffer to append the indicatorThe SFTP version being used version, PropertyResolver The resolver)PropertyResolver to query whether to enable the featureAppends the end-of-list= |
| public static Boolean | Returns: The actual indicator value used -null if none appendedThe buffer, int Buffer to append the indicatorThe SFTP version being used version, PropertyResolver The resolver, boolean PropertyResolver to query whether to enable the featureThe indicator value - indicatorValue)null means don't append the indicatorAppends the end-of-list indicator for |
| private static boolean | |
| public static Set | permissionsToAttributes(int
The permissions mask perms)Translates a mask of permissions into its enumeration values equivalents |
| public static int | Returns: The file type - seeSSH_FILEXFER_TYPE_xxx valuesThe POSIX permissions mask perms)Converts a POSIX permissions mask to a file type value |
| public static List | |
| public static NavigableMap | |
| public static NavigableMap | |
| public static FileTime | |
| public static String | |
| public static int | Returns: The matching sub-statusThe thrown t)ThrowableReturns the most adequate sub-status for the provided exception |
| public static NavigableMap | |
| public static NavigableMap | |
| public static <B extends Buffer> B | |
| public static <B extends Buffer> B | |
| public static <B extends Buffer> B | |
| public static < Type of B extends Buffer> BBuffer being updated | Returns: The updated bufferThe target buffer instance buffer, int The output encoding version version, Map<String, ?> The attributes)Map of attributesWrites a file / folder's attributes to a buffer |
| public static < Type of B extends Buffer> BBuffer being updated | Returns: The updated bufferThe target buffer instance buffer, int The actual version - must be version, Map<String, ?> SftpConstants#SFTP_V3The attributes)Map of attributesWrites the retrieved file / directory attributes in V3 format |
| public static < Type of B extends Buffer> BBuffer being updated | Returns: The updated bufferThe target buffer instance buffer, int The actual version - must be at least version, Map<String, ?> SftpConstants#SFTP_V4The attributes)Map of attributesWrites the retrieved file / directory attributes in V4+ format |
| public static <B extends Buffer> B | |
| public static < Type of B extends Buffer> BBuffer being updated |
| DEFAULT_SUBSTATUS_MESSAGE | back to summary |
|---|---|
| public static final Map<Integer, String> DEFAULT_SUBSTATUS_MESSAGE | |
| UNIX_PERMISSIONS_START | back to summary |
|---|---|
| private static final Pattern UNIX_PERMISSIONS_START | |
| SftpHelper | back to summary |
|---|---|
| private SftpHelper() | |
| attributesToPermissions | back to summary |
|---|---|
| public static int attributesToPermissions(boolean isReg, boolean isDir, boolean isLnk, Collection<PosixFilePermission> perms) Converts a file / folder's attributes into a mask
| |
| buildAclEntry | back to summary |
|---|---|
| public static AclEntry buildAclEntry(int aclType, int aclFlag, int aclMask, String aclWho) | |
| complete | back to summary |
|---|---|
| public static SftpClient. Fills in missing information in the attributes if an SFTP v3 long name is available. If missing information cannot be extracted from the long name, it is not filled in, but no error or exception is generated. The SFTP draft RFC discourages parsing a long name to extract information and states the attributes should be used instead. But some SFTP v3 servers do not send all information in the attributes... for instance the SolarWinds SFTP server on Windows does not include the file type flags in the permissions. The only way to determine the file type is then to look at the permissions string in the long name.
| |
| decodeAclEntryType | back to summary |
|---|---|
public static AclEntryType decodeAclEntryType(int aclType)
| |
| decodeAclFlags | back to summary |
|---|---|
| public static Set | |
| decodeAclMask | back to summary |
|---|---|
| public static Set | |
| decodeACLs | back to summary |
|---|---|
| public static List | |
| encodeAclEntryType | back to summary |
|---|---|
| public static int encodeAclEntryType(AclEntryType type) Returns the equivalent SFTP value for the ACL type
| |
| encodeAclFlags | back to summary |
|---|---|
| public static long encodeAclFlags(Collection<AclEntryFlag> flags) | |
| encodeAclMask | back to summary |
|---|---|
| public static long encodeAclMask(Collection<AclEntryPermission> mask) | |
| encodeACLs | back to summary |
|---|---|
| public static <B extends Buffer> B encodeACLs(B buffer, int version, Collection<AclEntry> acl) | |
| fileTypeFromChar | back to summary |
|---|---|
| public static int fileTypeFromChar(char ch) Converts a POSIX/Linux file type indicator (as if obtained by "ls -l") to a file type.
| |
| fileTypeToPermission | back to summary |
|---|---|
| public static int fileTypeToPermission(int type) Converts a file type into a POSIX permission mask value
| |
| getBool | back to summary |
|---|---|
public static boolean getBool(Boolean bool)
| |
| getEndOfFileIndicatorValue | back to summary |
|---|---|
| public static Boolean getEndOfFileIndicatorValue(Buffer buffer, int version) Retrieves the end-of-file indicator for
| |
| getEndOfListIndicatorValue | back to summary |
|---|---|
| public static Boolean getEndOfListIndicatorValue(Buffer buffer, int version) Retrieves the end-of-list indicator for
| |
| getLongName | back to summary |
|---|---|
| public static String getLongName(String shortName, Map<String, ?> attributes) Creates an "ls -l" compatible long name string | |
| indicateEndOfNamesList | back to summary |
|---|---|
| public static Boolean indicateEndOfNamesList(Buffer buffer, int version, PropertyResolver resolver) Appends the end-of-list=
| |
| indicateEndOfNamesList | back to summary |
|---|---|
| public static Boolean indicateEndOfNamesList(Buffer buffer, int version, PropertyResolver resolver, boolean indicatorValue) Appends the end-of-list indicator for
| |
| isUnixPermissions | back to summary |
|---|---|
| private static boolean isUnixPermissions(String longName) | |
| permissionsToAttributes | back to summary |
|---|---|
| public static Set Translates a mask of permissions into its enumeration values equivalents
| |
| permissionsToFileType | back to summary |
|---|---|
| public static int permissionsToFileType(int perms) Converts a POSIX permissions mask to a file type value
| |
| readACLs | back to summary |
|---|---|
| public static List | |
| readAttrs | back to summary |
|---|---|
| public static NavigableMap | |
| readExtensions | back to summary |
|---|---|
| public static NavigableMap | |
| readTime | back to summary |
|---|---|
| public static FileTime readTime(Buffer buffer, int version, int flags) Decodes a | |
| resolveStatusMessage | back to summary |
|---|---|
| public static String resolveStatusMessage(int subStatus) | |
| resolveSubstatus | back to summary |
|---|---|
| public static int resolveSubstatus(Throwable t) Returns the most adequate sub-status for the provided exception
| |
| toBinaryExtensions | back to summary |
|---|---|
| public static NavigableMap | |
| toStringExtensions | back to summary |
|---|---|
| public static NavigableMap | |
| writeAclEntry | back to summary |
|---|---|
| public static <B extends Buffer> B writeAclEntry(B buffer, AclEntry acl) | |
| writeACLs | back to summary |
|---|---|
| public static <B extends Buffer> B writeACLs(B buffer, int version, Collection<AclEntry> acl) | |
| writeAttributes | back to summary |
|---|---|
| public static <B extends Buffer> B writeAttributes(B buffer, SftpClient. | |
| writeAttrs | back to summary |
|---|---|
| public static <B extends Buffer> B writeAttrs(B buffer, int version, Map<String, ?> attributes) Writes a file / folder's attributes to a buffer
| |
| writeAttrsV3 | back to summary |
|---|---|
| public static <B extends Buffer> B writeAttrsV3(B buffer, int version, Map<String, ?> attributes) Writes the retrieved file / directory attributes in V3 format
| |
| writeAttrsV4 | back to summary |
|---|---|
| public static <B extends Buffer> B writeAttrsV4(B buffer, int version, Map<String, ?> attributes) Writes the retrieved file / directory attributes in V4+ format
| |
| writeExtensions | back to summary |
|---|---|
| public static <B extends Buffer> B writeExtensions(B buffer, Map<?, ?> extensions) | |
| writeTime | back to summary |
|---|---|
| public static <B extends Buffer> B writeTime(B buffer, int version, int flags, FileTime time) Encodes a | |