Add pathclass.drive for convenient splitdrive.
This commit is contained in:
parent
f090d7d83d
commit
081313d7ef
1 changed files with 4 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue