diff options
author | Edoardo La Greca | 2025-08-10 17:08:46 +0200 |
---|---|---|
committer | Edoardo La Greca | 2025-08-10 17:08:46 +0200 |
commit | c9bef669b4c833920592c0f6a2ac8018df64b86e (patch) | |
tree | 4d89634fcb14ce498d65c39433c2bfb46e0847de | |
parent | 0471c032bf57f77989b20f120e0250b0e295e940 (diff) |
rename DIRECTORY_BIT to DMDIR
-rw-r--r-- | src/main/kotlin/FilePermissions.kt | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/kotlin/FilePermissions.kt b/src/main/kotlin/FilePermissions.kt index c34c7d6..84a7944 100644 --- a/src/main/kotlin/FilePermissions.kt +++ b/src/main/kotlin/FilePermissions.kt @@ -23,8 +23,7 @@ class FilePermissions { */ val isDirectory: Boolean - private val DIRECTORY_BIT: UInt = 0x80000000u - + private val DMDIR: UInt = 0x80000000u /** * Constructor for file permissions with separate fields. @@ -50,7 +49,7 @@ class FilePermissions { constructor(raw: List<UByte>) { require(raw.size >= 4) val raw = raw.slice(0..4) - val dirValue = raw[0].toUInt().xor(this.DIRECTORY_BIT) + val dirValue = raw[0].toUInt().xor(this.DMDIR) this.isDirectory = dirValue > 0u this.userPerms = Permissions.fromByte(raw[1]) this.groupPerms = Permissions.fromByte(raw[2]) @@ -86,7 +85,7 @@ class FilePermissions { perms.or(permFileds[i].bits.toUInt().shl(8 * (permFileds.size - 1 - i))) } if (isDirectory) { - perms.or(this.DIRECTORY_BIT) + perms.or(this.DMDIR) } return perms } |