public void setAttribute()

in src/main/java/com/pastdev/jsch/nio/file/UnixSshFileSystemProvider.java [542:560]


    public void setAttribute( Path path, String attribute, Object value, LinkOption... linkOptions ) throws IOException {
        String viewName = null;
        String attributeName = null;
        int colonIndex = attribute.indexOf( ':' );
        if ( colonIndex < 0 ) {
            viewName = "basic";
            attributeName = attribute;
        }
        else {
            viewName = attribute.substring( 0, colonIndex );
            attributeName = attribute.substring( colonIndex + 1 );
        }

        UnixSshBasicFileAttributeView view = getFileAttributeView( path, viewName, linkOptions );
        if ( view == null ) {
            throw new UnsupportedOperationException( "unsupported view " + viewName );
        }
        view.setAttribute( attributeName, value );
    }