/** * Called when the type or content of this file changes. */ @Override protected void onChange() throws Exception { statSelf(); }
/** * Called when the type or content of this file changes. */ @Override protected void onChange() throws Exception { statSelf(); }
/** * Called when the type or content of this file changes. */ @Override protected void onChange() throws Exception { statSelf(); }
/** * Called when the type or content of this file changes. */ @Override protected void onChange() throws Exception { statSelf(); }
/** * Determines the type of this file, returns null if the file does not exist. */ @Override protected FileType doGetType() throws Exception { if (attrs == null) { statSelf(); } if (attrs == null) { return FileType.IMAGINARY; } if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0) { throw new FileSystemException("vfs.provider.sftp/unknown-permissions.error"); } if (attrs.isDir()) { return FileType.FOLDER; } return FileType.FILE; }
/** * Determines the type of this file, returns null if the file does not exist. */ @Override protected FileType doGetType() throws Exception { if (attrs == null) { statSelf(); } if (attrs == null) { return FileType.IMAGINARY; } if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0) { throw new FileSystemException("vfs.provider.sftp/unknown-permissions.error"); } if (attrs.isDir()) { return FileType.FOLDER; } return FileType.FILE; }
/** * Determines the type of this file, returns null if the file does not exist. */ @Override protected FileType doGetType() throws Exception { if (attrs == null) { statSelf(); } if (attrs == null) { return FileType.IMAGINARY; } if ((attrs.getFlags() & SftpATTRS.SSH_FILEXFER_ATTR_PERMISSIONS) == 0) { throw new FileSystemException("vfs.provider.sftp/unknown-permissions.error"); } if (attrs.isDir()) { return FileType.FOLDER; } return FileType.FILE; }
/** * Returns the POSIX type permissions of the file. * * @param checkIds {@code true} if user and group ID should be checked (needed for some access rights checks) * @return A PosixPermission object * @throws Exception If an error occurs * @since 2.1 */ protected PosixPermissions getPermissions(final boolean checkIds) throws Exception { statSelf(); boolean isInGroup = false; if (checkIds) { for (final int groupId : getAbstractFileSystem().getGroupsIds()) { if (groupId == attrs.getGId()) { isInGroup = true; break; } } } final boolean isOwner = checkIds ? attrs.getUId() == getAbstractFileSystem().getUId() : false; return new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup); }
/** * Returns the POSIX type permissions of the file. * * @param checkIds {@code true} if user and group ID should be checked (needed for some access rights checks) * @return A PosixPermission object * @throws Exception If an error occurs * @since 2.1 */ protected PosixPermissions getPermissions(final boolean checkIds) throws Exception { statSelf(); boolean isInGroup = false; if (checkIds) { for (final int groupId : getAbstractFileSystem().getGroupsIds()) { if (groupId == attrs.getGId()) { isInGroup = true; break; } } } final boolean isOwner = checkIds ? attrs.getUId() == getAbstractFileSystem().getUId() : false; return new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup); }
/** * Returns the POSIX type permissions of the file. * * @param checkIds {@code true} if user and group ID should be checked (needed for some access rights checks) * @return A PosixPermission object * @throws Exception If an error occurs * @since 2.1 */ protected PosixPermissions getPermissions(final boolean checkIds) throws Exception { statSelf(); boolean isInGroup = false; if (checkIds) { for (final int groupId : getAbstractFileSystem().getGroupsIds()) { if (groupId == attrs.getGId()) { isInGroup = true; break; } } } final boolean isOwner = checkIds ? attrs.getUId() == getAbstractFileSystem().getUId() : false; return new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup); }
/** * Returns the POSIX type permissions of the file. * * @param checkIds {@code true} if user and group ID should be checked (needed for some access rights checks) * @return A PosixPermission object * @throws Exception If an error occurs * @since 2.1 */ protected PosixPermissions getPermissions(final boolean checkIds) throws Exception { statSelf(); boolean isInGroup = false; if (checkIds) { for (final int groupId : getAbstractFileSystem().getGroupsIds()) { if (groupId == attrs.getGId()) { isInGroup = true; break; } } } final boolean isOwner = checkIds ? attrs.getUId() == getAbstractFileSystem().getUId() : false; final PosixPermissions permissions = new PosixPermissions(attrs.getPermissions(), isOwner, isInGroup); return permissions; }