ls -l
This commit is contained in:
1 parent
0d419b0b47
commit
b0cc7f237d
2 files changed
+26
-2
No files matched your search
@@ -51,5 +51,14 @@ static inline std::string mode_to_str(_u16 mode) {
|
||||
ans += std::to_string((mode & S_IRWXG) >> 3);
|
||||
ans += std::to_string((mode & S_IRWXO) >> 0);
|
||||
|
||||
return ans;
|
||||
}
|
||||
#include "bits.h"
|
||||
static inline std::string previlege_to_str(_u16 mode) {
|
||||
std::string ans = "rwxrwxrwx";
|
||||
for (_u16 i = 0; i < 9; i++) {
|
||||
if (_chk_bit(mode, 8 - i) == 0)
|
||||
ans[i] = '-';
|
||||
}
|
||||
return ans;
|
||||
}
|
||||
Reference in new issue
Block a user