Add aliases assert_is_dir, assert_not_dir.
This commit is contained in:
parent
05586e7e79
commit
a4196f2b13
1 changed files with 4 additions and 0 deletions
|
@ -167,6 +167,8 @@ class Path:
|
|||
if self.is_dir:
|
||||
raise IsDirectory(self)
|
||||
|
||||
assert_not_dir = assert_not_directory
|
||||
|
||||
def assert_not_link(self):
|
||||
if self.is_link:
|
||||
raise IsLink(self)
|
||||
|
@ -179,6 +181,8 @@ class Path:
|
|||
if not self.is_dir:
|
||||
raise NotDirectory(self)
|
||||
|
||||
assert_is_dir = assert_is_directory
|
||||
|
||||
def assert_is_link(self):
|
||||
if not self.is_link:
|
||||
raise NotLink(self)
|
||||
|
|
Loading…
Reference in a new issue