@@ -576,6 +576,11 @@ def path(self) -> AnyStr:
576
576
dir_path = sep .join (names )
577
577
return self .filesystem .absnormpath (dir_path )
578
578
579
+ @property
580
+ def is_junction (self ) -> bool :
581
+ # TODO: implement junctions
582
+ return False
583
+
579
584
def __getattr__ (self , item : str ) -> Any :
580
585
"""Forward some properties to stat_result."""
581
586
if item in self .stat_types :
@@ -3440,6 +3445,22 @@ def islink(self, path: AnyPath) -> bool:
3440
3445
"""
3441
3446
return self ._is_of_type (path , S_IFLNK , follow_symlinks = False )
3442
3447
3448
+ def isjunction (self , path : AnyPath ) -> bool :
3449
+ """Determine if path identifies a junction.
3450
+
3451
+ Args:
3452
+ path: Path to filesystem object.
3453
+
3454
+ Returns:
3455
+ `False` on posix systems.
3456
+ `True` if path is a junction on Windows.
3457
+
3458
+ Raises:
3459
+ TypeError: if path is None.
3460
+ """
3461
+ # TODO: implement junction on Windows
3462
+ return False
3463
+
3443
3464
def confirmdir (
3444
3465
self , target_directory : AnyStr , check_owner : bool = False
3445
3466
) -> FakeDirectory :
@@ -3602,6 +3623,7 @@ def dir() -> List[str]:
3602
3623
"isdir" ,
3603
3624
"isfile" ,
3604
3625
"islink" ,
3626
+ "isjunction" ,
3605
3627
"ismount" ,
3606
3628
"join" ,
3607
3629
"lexists" ,
@@ -3702,6 +3724,20 @@ def islink(self, path: AnyStr) -> bool:
3702
3724
"""
3703
3725
return self .filesystem .islink (path )
3704
3726
3727
+ def isjunction (self , path : AnyStr ) -> bool :
3728
+ """Determine whether path is a junction.
3729
+
3730
+ Args:
3731
+ path: Path to filesystem object.
3732
+
3733
+ Returns:
3734
+ `True` if path is a junction.
3735
+
3736
+ Raises:
3737
+ TypeError: if path is None.
3738
+ """
3739
+ return self .filesystem .isjunction (path )
3740
+
3705
3741
def getmtime (self , path : AnyStr ) -> float :
3706
3742
"""Returns the modification time of the fake file.
3707
3743
0 commit comments