/** * Verify that the current user has execute permission to the specified path * * @param session - the Session * @param path - the file system path * @throws FileSystemException - if the condition is not true */ protected void verifyExecutePermission(Session session, String path) { UserAccount userAccount = getUserAccount(session); FileSystemEntry entry = getFileSystem().getEntry(path); verifyFileSystemCondition(userAccount.canExecute(entry), path, "filesystem.cannotExecute"); }
/** * Verify that the current user has write permission to the specified path * * @param session - the Session * @param path - the file system path * @throws FileSystemException - if the condition is not true */ protected void verifyWritePermission(Session session, String path) { UserAccount userAccount = getUserAccount(session); FileSystemEntry entry = getFileSystem().getEntry(path); verifyFileSystemCondition(userAccount.canWrite(entry), path, "filesystem.cannotWrite"); }
/** * Verify that the current user has read permission to the specified path * * @param session - the Session * @param path - the file system path * @throws FileSystemException - if the condition is not true */ protected void verifyReadPermission(Session session, String path) { UserAccount userAccount = getUserAccount(session); FileSystemEntry entry = getFileSystem().getEntry(path); verifyFileSystemCondition(userAccount.canRead(entry), path, "filesystem.cannotRead"); }