25 lines
541 B
C#
25 lines
541 B
C#
|
namespace Qdls;
|
||
|
|
||
|
using System.IO;
|
||
|
|
||
|
public static class Util {
|
||
|
|
||
|
public static bool IsHidden(string path) {
|
||
|
var name = Path.GetFileName(path);
|
||
|
return
|
||
|
name.StartsWith('.') ||
|
||
|
( File.GetAttributes(path) & FileAttributes.Hidden ) == FileAttributes.Hidden;
|
||
|
}
|
||
|
|
||
|
}
|
||
|
|
||
|
public static class Format {
|
||
|
|
||
|
public const string Reset = "\x1b[0m"; // reset
|
||
|
public const string Hidden = "\x1b[2;3m"; // faint + italic
|
||
|
public const string Executable = "\x1b[1;32m"; // bold + green
|
||
|
public const string Directory = "\x1b[1;34m"; // bold + blue
|
||
|
|
||
|
}
|
||
|
|