private String statCommand()

in src/main/java/com/pastdev/jsch/nio/file/UnixSshFileSystemProvider.java [607:634]


    private String statCommand( UnixSshPath path, SupportedAttribute[] attributes, boolean newline ) {
        final StringBuilder commandBuilder;
        final Variant variant = path.getFileSystem().getVariant("stat");
        switch(variant) {
            case BSD:
                commandBuilder = new StringBuilder(path.getFileSystem().getCommand("stat"))
                        .append(" -f \"");
                break;

            case GNU:
            default:
                commandBuilder = new StringBuilder( path.getFileSystem().getCommand( "stat" ) )
                        .append( " -c \"" );
                break;
        }

        // Default case
        for ( int i = 0; i < attributes.length; i++ ) {
            if ( i > 0 ) {
                commandBuilder.append( ASCII_UNIT_SEPARATOR );
            }
            commandBuilder.append( attributes[i].option(variant) );
        }
        if ( newline ) {
            commandBuilder.append( "\\n" );
        }
        return commandBuilder.append( "\"" ).toString();
    }