return new TerminalString(label, new TerminalColor(Color.RED, Color.DEFAULT)).toString();
}
public static TerminalString colorizeResourceTerminal(FileResource<?> resource)
{
TerminalString name;
if (resource.isDirectory())
{
name = new TerminalString(resource.getName(), new TerminalColor(Color.BLUE, Color.DEFAULT));
}
else if (resource.isExecutable())
{
name = new TerminalString(resource.getName(), new TerminalColor(Color.GREEN, Color.DEFAULT));
}
else
{
name = new TerminalString(resource.getName());
}
return name;
}