file system
This commit is contained in:
parent
449ae53fe9
commit
a505b0bbcd
1 changed files with 20 additions and 0 deletions
20
python/experıment_file_system.py
Normal file
20
python/experıment_file_system.py
Normal file
|
@ -0,0 +1,20 @@
|
|||
import os
|
||||
|
||||
def detect_file_system():
|
||||
try:
|
||||
# Check the root directory's file system type
|
||||
os_info = os.uname()
|
||||
print(f"Operating System: {os_info.sysname}")
|
||||
if os_info.sysname == "Linux":
|
||||
print("Likely file system: ext4, ext3, or similar.")
|
||||
elif os_info.sysname == "Darwin":
|
||||
print("Likely file system: APFS or HFS+.")
|
||||
elif os_info.sysname == "Windows":
|
||||
print("Likely file system: NTFS or FAT32.")
|
||||
else:
|
||||
print("Unable to determine the file system type.")
|
||||
except Exception as e:
|
||||
print(f"An error occurred: {e}")
|
||||
|
||||
if __name__ == "__main__":
|
||||
detect_file_system()
|
Loading…
Add table
Reference in a new issue