summaryrefslogtreecommitdiff
path: root/src/leap/bitmask/util
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2013-09-30 16:29:30 -0300
committerTomás Touceda <chiiph@leap.se>2013-09-30 16:29:30 -0300
commitfb453925ff45ff37e58f41c1877c2069f4f58f89 (patch)
treefe3275d27a13872e236bd6adb853fe0c1b10416b /src/leap/bitmask/util
parent66c486a534b5ecd2178e096bea3b300971f59b5b (diff)
parentdecae946e725ce5275f8035e33a9d6adb69b3342 (diff)
Merge remote-tracking branch 'kali/feature/soledad_boostrap_error_handling' into develop
Diffstat (limited to 'src/leap/bitmask/util')
-rw-r--r--src/leap/bitmask/util/__init__.py14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/leap/bitmask/util/__init__.py b/src/leap/bitmask/util/__init__.py
index f762a350..b58e6e3b 100644
--- a/src/leap/bitmask/util/__init__.py
+++ b/src/leap/bitmask/util/__init__.py
@@ -62,3 +62,17 @@ def update_modification_ts(path):
"""
os.utime(path, None)
return get_modification_ts(path)
+
+
+def is_file(path):
+ """
+ Returns True if the path exists and is a file.
+ """
+ return os.path.isfile(path)
+
+
+def is_empty_file(path):
+ """
+ Returns True if the file at path is empty.
+ """
+ return os.stat(path).st_size is 0