Class SftpFileAttributes
- Type Parameters:
SSH_FILEXFER_TYPE_FIFO-
- Author:
- Lee David Painter
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intPermissions flag: Identifies the file as a block special filestatic final intPermissions flag: Identifies the file as a character devicestatic final intPermissions flag: Identifies the file as a directorystatic final intPermissions flag: Identifies the file as a pipestatic final intPermissions flag: Identifies the file as a symbolic linkstatic final intFormat mask constant can be used to mask off a file type from the mode.static final intPermissions flag: Identifies the file as a regular filestatic final intPermissions flag: Identifies the file as a socketstatic final intPermissions flag: Permits a file's group to read the file.static final intPermissions flag: Permits others to read the file.static final intPermissions flag: Permits the owner of a file to read the file.static final intPermissions flag: Bit to determine whether a file is executed as the group ownerstatic final intPermissions flag: Bit to determine whether a file is executed as the ownerstatic final intPermissions flag: Permits a file's group to write to the file.static final intPermissions flag: Permits others to write to the file.static final intPermissions flag: Permits the owner of a file to write to the file.static final intPermissions flag: Permits a file's group to execute the file or to search the file's directory.static final intPermissions flag: Permits others to execute the file or to search the file's directory.static final intPermissions flag: Permits the owner of a file to execute the file or to search the file's directory.static final intFormat mask constant to mask off file mode from the type.static final intstatic final intstatic final intstatic final intstatic final intstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSftpFileAttributes(int type, String charsetEncoding) Deprecated, for removal: This API element is subject to removal in a future version.SftpFileAttributes(com.sshtools.common.util.ByteArrayReader bar, int version, String charsetEncoding) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionacls()com.sshtools.common.util.UnsignedInteger32aclsFlag()Optional<com.sshtools.common.util.UnsignedInteger32>com.sshtools.common.util.UnsignedInteger64Optional<com.sshtools.common.util.UnsignedInteger64>com.sshtools.common.util.UnsignedInteger32Optional<com.sshtools.common.util.UnsignedInteger32>com.sshtools.common.util.UnsignedInteger32Optional<com.sshtools.common.util.UnsignedInteger32>byte[]extendedAttribute(String key) Optional<byte[]>longflags()Deprecated, for removal: This API element is subject to removal in a future version.com.sshtools.common.util.UnsignedInteger64Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.com.sshtools.common.util.UnsignedInteger64Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.getGID()Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.intDeprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.com.sshtools.common.util.UnsignedInteger64Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.Deprecated, for removal: This API element is subject to removal in a future version.com.sshtools.common.util.UnsignedInteger64getSize()Deprecated, for removal: This API element is subject to removal in a future version.intgetType()Deprecated, for removal: This API element is subject to removal in a future version.getUID()Deprecated, for removal: This API element is subject to removal in a future version.intgid()gidOr()group()groupOr()booleanDeprecated, for removal: This API element is subject to removal in a future version.booleanbooleanbooleanbooleanbooleanbooleanhasGid()booleanhasGID()Deprecated, for removal: This API element is subject to removal in a future version.booleanhasGroup()booleanbooleanbooleanbooleanDeprecated, for removal: This API element is subject to removal in a future version.booleanbooleanhasSize()booleanbooleanbooleanbooleanhasUid()booleanhasUID()Deprecated, for removal: This API element is subject to removal in a future version.booleanbooleanbooleanbooleanisAttributeBitSet(long attributeBit) booleanisBlock()booleanbooleanbooleanbooleanbooleanbooleanisFifo()booleanisFile()booleanisHidden()booleanbooleanisLink()booleanbooleanisSocket()booleanisSparse()booleanbooleanbooleanisSync()booleanisSystem()intmimeType()voidremoveExtendedAttribute(String attrName) Deprecated, for removal: This API element is subject to removal in a future version.voidsetExtendedAttribute(String attrName, byte[] attrValue) Deprecated, for removal: This API element is subject to removal in a future version.voidsetExtendedAttributes(Map<String, byte[]> attributes) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidsetPermissions(PosixPermissions newPermissions) Deprecated, for removal: This API element is subject to removal in a future version.voidsetPermissions(com.sshtools.common.util.UnsignedInteger32 permissions) Deprecated, for removal: This API element is subject to removal in a future version.voidsetPermissions(String newPermissions) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidsetSize(com.sshtools.common.util.UnsignedInteger64 size) Deprecated, for removal: This API element is subject to removal in a future version.voidsetTimes(com.sshtools.common.util.UnsignedInteger64 atime, com.sshtools.common.util.UnsignedInteger32 atime_nano, com.sshtools.common.util.UnsignedInteger64 mtime, com.sshtools.common.util.UnsignedInteger32 mtime_nano, com.sshtools.common.util.UnsignedInteger64 ctime, com.sshtools.common.util.UnsignedInteger32 ctime_nano) Deprecated.voidsetTimes(com.sshtools.common.util.UnsignedInteger64 atime, com.sshtools.common.util.UnsignedInteger64 mtime) Deprecated, for removal: This API element is subject to removal in a future version.voidsetTimes(com.sshtools.common.util.UnsignedInteger64 atime, com.sshtools.common.util.UnsignedInteger64 mtime, com.sshtools.common.util.UnsignedInteger64 ctime) Deprecated, for removal: This API element is subject to removal in a future version.voidDeprecated, for removal: This API element is subject to removal in a future version.voidsetUsername(String username) Deprecated, for removal: This API element is subject to removal in a future version.com.sshtools.common.util.UnsignedInteger64size()Optional<com.sshtools.common.util.UnsignedInteger64>sizeOr()longlongbytetextHint()byte[]toByteArray(int version) Returns a formatted byte array suitable for encoding into SFTP subsystem messages.intinttype()intuid()uidOr()username()
-
Field Details
-
SSH_FILEXFER_ATTR_SIZE
public static final long SSH_FILEXFER_ATTR_SIZE- See Also:
-
SSH_FILEXFER_ATTR_UIDGID
public static final long SSH_FILEXFER_ATTR_UIDGID- See Also:
-
SSH_FILEXFER_ATTR_PERMISSIONS
public static final long SSH_FILEXFER_ATTR_PERMISSIONS- See Also:
-
SSH_FILEXFER_ATTR_ACCESSTIME
public static final long SSH_FILEXFER_ATTR_ACCESSTIME- See Also:
-
SSH_FILEXFER_ATTR_EXTENDED
public static final long SSH_FILEXFER_ATTR_EXTENDED- See Also:
-
VERSION_3_FLAGS
public static final long VERSION_3_FLAGS- See Also:
-
SSH_FILEXFER_ATTR_CREATETIME
public static final long SSH_FILEXFER_ATTR_CREATETIME- See Also:
-
SSH_FILEXFER_ATTR_MODIFYTIME
public static final long SSH_FILEXFER_ATTR_MODIFYTIME- See Also:
-
SSH_FILEXFER_ATTR_ACL
public static final long SSH_FILEXFER_ATTR_ACL- See Also:
-
SSH_FILEXFER_ATTR_OWNERGROUP
public static final long SSH_FILEXFER_ATTR_OWNERGROUP- See Also:
-
SSH_FILEXFER_ATTR_SUBSECOND_TIMES
public static final long SSH_FILEXFER_ATTR_SUBSECOND_TIMES- See Also:
-
VERSION_4_FLAGS
public static final long VERSION_4_FLAGS- See Also:
-
SSH_FILEXFER_ATTR_BITS
public static final long SSH_FILEXFER_ATTR_BITS- See Also:
-
VERSION_5_FLAGS
public static final long VERSION_5_FLAGS- See Also:
-
SSH_FILEXFER_ATTR_ALLOCATION_SIZE
public static final long SSH_FILEXFER_ATTR_ALLOCATION_SIZE- See Also:
-
SSH_FILEXFER_ATTR_TEXT_HINT
public static final long SSH_FILEXFER_ATTR_TEXT_HINT- See Also:
-
SSH_FILEXFER_ATTR_MIME_TYPE
public static final long SSH_FILEXFER_ATTR_MIME_TYPE- See Also:
-
SSH_FILEXFER_ATTR_LINK_COUNT
public static final long SSH_FILEXFER_ATTR_LINK_COUNT- See Also:
-
SSH_FILEXFER_ATTR_UNTRANSLATED
public static final long SSH_FILEXFER_ATTR_UNTRANSLATED- See Also:
-
SSH_FILEXFER_ATTR_CTIME
public static final long SSH_FILEXFER_ATTR_CTIME- See Also:
-
VERSION_6_FLAGS
public static final long VERSION_6_FLAGS- See Also:
-
SSH_FILEXFER_TYPE_REGULAR
public static final int SSH_FILEXFER_TYPE_REGULAR- See Also:
-
SSH_FILEXFER_TYPE_DIRECTORY
public static final int SSH_FILEXFER_TYPE_DIRECTORY- See Also:
-
SSH_FILEXFER_TYPE_SYMLINK
public static final int SSH_FILEXFER_TYPE_SYMLINK- See Also:
-
SSH_FILEXFER_TYPE_SPECIAL
public static final int SSH_FILEXFER_TYPE_SPECIAL- See Also:
-
SSH_FILEXFER_TYPE_UNKNOWN
public static final int SSH_FILEXFER_TYPE_UNKNOWN- See Also:
-
SSH_FILEXFER_TYPE_SOCKET
public static final int SSH_FILEXFER_TYPE_SOCKET- See Also:
-
SSH_FILEXFER_TYPE_CHAR_DEVICE
public static final int SSH_FILEXFER_TYPE_CHAR_DEVICE- See Also:
-
SSH_FILEXFER_TYPE_BLOCK_DEVICE
public static final int SSH_FILEXFER_TYPE_BLOCK_DEVICE- See Also:
-
SSH_FILEXFER_TYPE_FIFO
public static final int SSH_FILEXFER_TYPE_FIFO- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_READONLY
public static final int SSH_FILEXFER_ATTR_FLAGS_READONLY- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_SYSTEM
public static final int SSH_FILEXFER_ATTR_FLAGS_SYSTEM- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_HIDDEN
public static final int SSH_FILEXFER_ATTR_FLAGS_HIDDEN- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_CASE_INSENSITIVE
public static final int SSH_FILEXFER_ATTR_FLAGS_CASE_INSENSITIVE- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_ARCHIVE
public static final int SSH_FILEXFER_ATTR_FLAGS_ARCHIVE- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_ENCRYPTED
public static final int SSH_FILEXFER_ATTR_FLAGS_ENCRYPTED- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_COMPRESSED
public static final int SSH_FILEXFER_ATTR_FLAGS_COMPRESSED- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_SPARSE
public static final int SSH_FILEXFER_ATTR_FLAGS_SPARSE- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_APPEND_ONLY
public static final int SSH_FILEXFER_ATTR_FLAGS_APPEND_ONLY- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_IMMUTABLE
public static final int SSH_FILEXFER_ATTR_FLAGS_IMMUTABLE- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_SYNC
public static final int SSH_FILEXFER_ATTR_FLAGS_SYNC- See Also:
-
SSH_FILEXFER_ATTR_FLAGS_TRANSLATION_ERR
public static final int SSH_FILEXFER_ATTR_FLAGS_TRANSLATION_ERR- See Also:
-
SFX_ACL_CONTROL_INCLUDED
public static final int SFX_ACL_CONTROL_INCLUDED- See Also:
-
SFX_ACL_CONTROL_PRESENT
public static final int SFX_ACL_CONTROL_PRESENT- See Also:
-
SFX_ACL_CONTROL_INHERITED
public static final int SFX_ACL_CONTROL_INHERITED- See Also:
-
SFX_ACL_AUDIT_ALARM_INCLUDED
public static final int SFX_ACL_AUDIT_ALARM_INCLUDED- See Also:
-
SFX_ACL_AUDIT_ALARM_INHERITED
public static final int SFX_ACL_AUDIT_ALARM_INHERITED- See Also:
-
SSH_FILEXFER_ATTR_KNOWN_TEXT
public static final int SSH_FILEXFER_ATTR_KNOWN_TEXT- See Also:
-
SSH_FILEXFER_ATTR_GUESSED_TEXT
public static final int SSH_FILEXFER_ATTR_GUESSED_TEXT- See Also:
-
SSH_FILEXFER_ATTR_KNOWN_BINARY
public static final int SSH_FILEXFER_ATTR_KNOWN_BINARY- See Also:
-
SSH_FILEXFER_ATTR_GUESSED_BINARY
public static final int SSH_FILEXFER_ATTR_GUESSED_BINARY- See Also:
-
S_IFMT
public static final int S_IFMTFormat mask constant can be used to mask off a file type from the mode.- See Also:
-
S_MODE_MASK
public static final int S_MODE_MASKFormat mask constant to mask off file mode from the type.- See Also:
-
S_IFSOCK
public static final int S_IFSOCKPermissions flag: Identifies the file as a socket- See Also:
-
S_IFLNK
public static final int S_IFLNKPermissions flag: Identifies the file as a symbolic link- See Also:
-
S_IFREG
public static final int S_IFREGPermissions flag: Identifies the file as a regular file- See Also:
-
S_IFBLK
public static final int S_IFBLKPermissions flag: Identifies the file as a block special file- See Also:
-
S_IFDIR
public static final int S_IFDIRPermissions flag: Identifies the file as a directory- See Also:
-
S_IFCHR
public static final int S_IFCHRPermissions flag: Identifies the file as a character device- See Also:
-
S_IFIFO
public static final int S_IFIFOPermissions flag: Identifies the file as a pipe- See Also:
-
S_ISUID
public static final int S_ISUIDPermissions flag: Bit to determine whether a file is executed as the owner- See Also:
-
S_ISGID
public static final int S_ISGIDPermissions flag: Bit to determine whether a file is executed as the group owner- See Also:
-
S_IRUSR
public static final int S_IRUSRPermissions flag: Permits the owner of a file to read the file.- See Also:
-
S_IWUSR
public static final int S_IWUSRPermissions flag: Permits the owner of a file to write to the file.- See Also:
-
S_IXUSR
public static final int S_IXUSRPermissions flag: Permits the owner of a file to execute the file or to search the file's directory.- See Also:
-
S_IRGRP
public static final int S_IRGRPPermissions flag: Permits a file's group to read the file.- See Also:
-
S_IWGRP
public static final int S_IWGRPPermissions flag: Permits a file's group to write to the file.- See Also:
-
S_IXGRP
public static final int S_IXGRPPermissions flag: Permits a file's group to execute the file or to search the file's directory.- See Also:
-
S_IROTH
public static final int S_IROTHPermissions flag: Permits others to read the file.- See Also:
-
S_IWOTH
public static final int S_IWOTHPermissions flag: Permits others to write to the file.- See Also:
-
S_IXOTH
public static final int S_IXOTHPermissions flag: Permits others to execute the file or to search the file's directory.- See Also:
-
-
Constructor Details
-
SftpFileAttributes
@Deprecated(since="3.1.0", forRemoval=true) public SftpFileAttributes(com.sshtools.common.util.ByteArrayReader bar, int version, String charsetEncoding) throws IOException Deprecated, for removal: This API element is subject to removal in a future version.- Throws:
IOException
-
SftpFileAttributes
@Deprecated(since="3.1.0", forRemoval=true) public SftpFileAttributes(int type, String charsetEncoding) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
type-charsetEncoding-- See Also:
-
-
Method Details
-
acls
-
aclsFlag
public com.sshtools.common.util.UnsignedInteger32 aclsFlag() -
aclsFlagOr
-
allocationSize
public com.sshtools.common.util.UnsignedInteger64 allocationSize() -
allocationSizeOr
-
attributeBits
public com.sshtools.common.util.UnsignedInteger32 attributeBits() -
attributeBitsOr
-
attributeBitsValid
public com.sshtools.common.util.UnsignedInteger32 attributeBitsValid() -
attributeBitsValidOr
-
charsetEncoding
-
createTime
-
createTimeOr
-
extendedAttribute
-
extendedAttributeOr
-
extendedAttributes
-
flags
public long flags() -
getAccessedDateTime
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getAccessedTime
@Deprecated(since="3.1.0", forRemoval=true) public com.sshtools.common.util.UnsignedInteger64 getAccessedTime()Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getCreationDateTime
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getCreationTime
@Deprecated(since="3.1.0", forRemoval=true) public com.sshtools.common.util.UnsignedInteger64 getCreationTime()Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getExtendedAttributes
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getGID
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getMaskString
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getModeType
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getModifiedDateTime
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getModifiedTime
@Deprecated(since="3.1.0", forRemoval=true) public com.sshtools.common.util.UnsignedInteger64 getModifiedTime()Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getPermissionsString
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getPosixPermissions
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getSize
@Deprecated(since="3.1.0", forRemoval=true) public com.sshtools.common.util.UnsignedInteger64 getSize()Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
getType
Deprecated, for removal: This API element is subject to removal in a future version.Deprecated. At 3.2.0,SftpFileAttributeswill become entirely immutable.- Returns:
- type
- See Also:
-
getUID
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
gid
public int gid() -
gidOr
-
group
-
groupOr
-
hasAccessTime
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
hasAclFlags
public boolean hasAclFlags() -
hasAllocationSize
public boolean hasAllocationSize() -
hasAttributeBits
public boolean hasAttributeBits() -
hasCreateTime
public boolean hasCreateTime() -
hasExtendedAttribute
-
hasGid
public boolean hasGid() -
hasGID
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
hasGroup
public boolean hasGroup() -
hasLastAccessTime
public boolean hasLastAccessTime() -
hasLastAttributesModifiedTime
public boolean hasLastAttributesModifiedTime() -
hasLastModifiedTime
public boolean hasLastModifiedTime() -
hasModifiedTime
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
hasPermissions
public boolean hasPermissions() -
hasSize
public boolean hasSize() -
hasSubSecondTimes
public boolean hasSubSecondTimes() -
hasSupportedAttributeBits
public boolean hasSupportedAttributeBits() -
hasSupportedAttributeMask
public boolean hasSupportedAttributeMask() -
hasUid
public boolean hasUid() -
hasUID
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
hasUsername
public boolean hasUsername() -
isAppendOnly
public boolean isAppendOnly() -
isArchive
public boolean isArchive() -
isAttributeBitSet
public boolean isAttributeBitSet(long attributeBit) -
isBlock
public boolean isBlock() -
isCaseInsensitive
public boolean isCaseInsensitive() -
isCharacter
public boolean isCharacter() -
isSpecial
public boolean isSpecial() -
isCompressed
public boolean isCompressed() -
isDirectory
public boolean isDirectory() -
isEncrypted
public boolean isEncrypted() -
isFifo
public boolean isFifo() -
isFile
public boolean isFile() -
isHidden
public boolean isHidden() -
isImmutable
public boolean isImmutable() -
isLink
public boolean isLink() -
isReadOnly
public boolean isReadOnly() -
isSocket
public boolean isSocket() -
isSparse
public boolean isSparse() -
isSync
public boolean isSync() -
isSubSecondTimes
public boolean isSubSecondTimes() -
isSystem
public boolean isSystem() -
lastAccessTime
-
lastAccessTimeOr
-
lastAttributesModifiedTime
-
lastAttributesModifiedTimeOr
-
lastModifiedTime
-
lastModifiedTimeOr
-
linkCount
public int linkCount() -
linkCountOr
-
mimeType
-
mimeTypeOr
-
permissions
-
permissionsOr
-
removeExtendedAttribute
Deprecated, for removal: This API element is subject to removal in a future version.Set a single extended attribute value.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
attrName- attribute name to remove- See Also:
-
setExtendedAttribute
@Deprecated(since="3.1.0", forRemoval=true) public void setExtendedAttribute(String attrName, byte[] attrValue) Deprecated, for removal: This API element is subject to removal in a future version.Set a single extended attribute value.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
attrName- attribute nameattrValue- attribute value- See Also:
-
setExtendedAttributes
@Deprecated(since="3.1.0", forRemoval=true) public void setExtendedAttributes(Map<String, byte[]> attributes) Deprecated, for removal: This API element is subject to removal in a future version.Set all the extended attributes. The keys should be of type String, as should the values.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
attributes- map of all extended attributes- See Also:
-
setGID
Deprecated, for removal: This API element is subject to removal in a future version.Set the GID of this file.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
gid- gid- See Also:
-
setGroup
Deprecated, for removal: This API element is subject to removal in a future version.Set the group of this file.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
group- group- See Also:
-
setPermissions
@Deprecated(since="3.1.0", forRemoval=true) public void setPermissions(PosixPermissions newPermissions) Deprecated, for removal: This API element is subject to removal in a future version.Set the permissions using aPosixPermissionsset, created by aPosixPermissions.PosixPermissionsBuilder.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
newPermissions- new permissions
-
setPermissions
Deprecated, for removal: This API element is subject to removal in a future version.Set the permissions from a string in the format "rwxr-xr-x"Deprecated. See
setPermissions(PosixPermissions)for alternative.- Parameters:
newPermissions- new permissions string
-
setPermissions
@Deprecated(since="3.1.0", forRemoval=true) public void setPermissions(com.sshtools.common.util.UnsignedInteger32 permissions) Deprecated, for removal: This API element is subject to removal in a future version.Set the permissions of the file. This value should be a valid mask of the permissions flags defined within this class.- Parameters:
permissions- permssions- See Also:
-
setPermissionsFromMaskString
Deprecated, for removal: This API element is subject to removal in a future version.Set permissions given a UNIX style mask, for example '0644'Deprecated. See
setPermissions(PosixPermissions)for alternative.- Parameters:
mask- mask- Throws:
IllegalArgumentException- if badly formatted string
-
setPermissionsFromUmaskString
Deprecated, for removal: This API element is subject to removal in a future version.Set the permissions given a UNIX style umask, for example '0022' will result in 0022 ^ 0777.Deprecated. See
setPermissions(PosixPermissions)for alternative.- Parameters:
umask-- Throws:
IllegalArgumentException- if badly formatted string
-
setSize
@Deprecated(since="3.1.0", forRemoval=true) public void setSize(com.sshtools.common.util.UnsignedInteger64 size) Deprecated, for removal: This API element is subject to removal in a future version.Set the size of the file.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
group- group- See Also:
-
setTimes
public void setTimes(com.sshtools.common.util.UnsignedInteger64 atime, com.sshtools.common.util.UnsignedInteger32 atime_nano, com.sshtools.common.util.UnsignedInteger64 mtime, com.sshtools.common.util.UnsignedInteger32 mtime_nano, com.sshtools.common.util.UnsignedInteger64 ctime, com.sshtools.common.util.UnsignedInteger32 ctime_nano) Deprecated.Sets SFTP v4 time attributes including sub-second times. If you pass a null value for any sub-second time it will be defaulted to zero. If you pass null value for any time value if will be not be included in the attributes and its sub-second value will also not be included.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
atime-atime_nano-mtime-mtime_nano-ctime-ctime_nano-- See Also:
-
setTimes
@Deprecated(since="3.1.0", forRemoval=true) public void setTimes(com.sshtools.common.util.UnsignedInteger64 atime, com.sshtools.common.util.UnsignedInteger64 mtime) Deprecated, for removal: This API element is subject to removal in a future version.Deprecated. At 3.2.0,SftpFileAttributeswill become entirely immutable.- Parameters:
atime- atimemtime- mtime- See Also:
-
setTimes
@Deprecated(since="3.1.0", forRemoval=true) public void setTimes(com.sshtools.common.util.UnsignedInteger64 atime, com.sshtools.common.util.UnsignedInteger64 mtime, com.sshtools.common.util.UnsignedInteger64 ctime) Deprecated, for removal: This API element is subject to removal in a future version.Set SFTP v4 time attributes without any sub-second times.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
atime- last accessed timemtime- last modified timectime- creation time- See Also:
-
setUID
Deprecated, for removal: This API element is subject to removal in a future version.Set the UID of the owner.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
uid- uid- See Also:
-
setUsername
Deprecated, for removal: This API element is subject to removal in a future version.Set the username of this file.Deprecated. At 3.2.0,
SftpFileAttributeswill become entirely immutable.- Parameters:
username- usernameuid- See Also:
-
size
public com.sshtools.common.util.UnsignedInteger64 size() -
sizeOr
-
supportedAttributeBits
public long supportedAttributeBits() -
supportedAttributeBitsOr
-
supportedAttributeMask
public long supportedAttributeMask() -
supportedAttributeMaskOr
-
textHint
public byte textHint() -
textHintOr
-
toByteArray
Returns a formatted byte array suitable for encoding into SFTP subsystem messages.- Returns:
- byte[]
- Throws:
IOException
-
toMaskString
-
toModeType
public int toModeType() -
toPermissionsString
-
type
public int type() -
uid
public int uid() -
uidOr
-
untranslatedName
-
untranslatedNameOr
-
username
-
usernameOr
-
bestUsernameOr
-
bestUsername
-
bestGroupOr
-
bestGroup
-