Commit workspace transition from test_utils.py to test_forensics.py with new signatures CLI test case
This commit is contained in:
@@ -69,12 +69,12 @@ def inspect(path):
|
||||
except Exception:
|
||||
magic = ""
|
||||
|
||||
# Task 1: POSIX Permissions
|
||||
# POSIX Permissions
|
||||
mode = stat_info.st_mode
|
||||
permissions_octal = oct(stat.S_IMODE(mode))
|
||||
permissions_symbolic = stat.filemode(mode)
|
||||
|
||||
# Task 2: Ownership Identity
|
||||
# Ownership Identity
|
||||
owner_uid = stat_info.st_uid
|
||||
owner_gid = stat_info.st_gid
|
||||
owner_username = str(owner_uid)
|
||||
@@ -91,13 +91,13 @@ def inspect(path):
|
||||
except KeyError:
|
||||
pass
|
||||
|
||||
# Task 3: Allocation Metrics
|
||||
# Allocation Metrics
|
||||
if hasattr(stat_info, "st_blocks"):
|
||||
allocated_size = stat_info.st_blocks * 512
|
||||
else:
|
||||
allocated_size = size
|
||||
|
||||
# Task 4: Hard Links
|
||||
# Hard Links
|
||||
hard_links = stat_info.st_nlink
|
||||
|
||||
# Task 5: Inode & Device Identifiers
|
||||
|
||||
Reference in New Issue
Block a user