From 081313d7ef2cc4ec7723838336191cfac3d23a28 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Thu, 12 Mar 2020 17:45:42 -0700 Subject: [PATCH] Add pathclass.drive for convenient splitdrive. --- voussoirkit/pathclass.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/voussoirkit/pathclass.py b/voussoirkit/pathclass.py index c1a4321..5f55905 100644 --- a/voussoirkit/pathclass.py +++ b/voussoirkit/pathclass.py @@ -139,6 +139,10 @@ class Path: def dot_extension(self): return self.extension.with_dot + @property + def drive(self): + return os.path.splitdrive(self.absolute_path)[0] + @property def exists(self): return os.path.exists(self.absolute_path)