public interface VFSPermissionHandler
VirtualFileSystem
provides access to all files and
folders but this interface can be implemented to provide for custom permission
handling. Simply define an implementation and set the
"com.maverick.sshd.vfs.VFSPermissionHandler" system property to the fully
qualified class name of your class.Modifier and Type | Method and Description |
---|---|
boolean |
canExecute(String username,
String group,
String path)
Return true if the user can execute the file or list the directory.
|
boolean |
canRead(String username,
String group,
String path)
Return true if the user can read the file.
|
boolean |
canWrite(String username,
String group,
String path)
Return true if the user can write to the file.
|
SftpFileAttributes |
getPermissions(String username,
String path)
Get the files attributes.
|
boolean canRead(String username, String group, String path)
username
- group
- path
- boolean canWrite(String username, String group, String path)
username
- group
- path
- boolean canExecute(String username, String group, String path)
username
- group
- path
- SftpFileAttributes getPermissions(String username, String path) throws FileNotFoundException
path
- FileNotFoundException
Copyright © 2024. All rights reserved.