summaryrefslogtreecommitdiffstats
path: root/src/utils/probe.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/probe.py')
-rw-r--r--src/utils/probe.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/utils/probe.py b/src/utils/probe.py
index 2ed029b..e53f08f 100644
--- a/src/utils/probe.py
+++ b/src/utils/probe.py
@@ -178,3 +178,10 @@ def os_probe(mountpoint):
return getwindowsversion(winreghives)
else:
return 'unknown'
+
+def is_hibernation_enabled(mountpoint):
+ if get_os_family(mountpoint) != OSFamily.WINDOWS:
+ return False
+
+ hiberfile_path = f'{mountpoint}/hiberfil.sys'
+ return os.path.exists(hiberfile_path)