##// END OF EJS Templates
Copy over docstrings from the path.path methods.
walter.doerwald -
Show More
@@ -609,49 +609,60 b' class ifile(path.path):'
609 return ifile(path.__div__(self, other))
609 return ifile(path.__div__(self, other))
610
610
611 def getcwd():
611 def getcwd():
612 """ Return the current working directory as a path object. """
613 return ifile(path.path.getcwd())
612 return ifile(path.path.getcwd())
613 getcwd.__doc__ = path.path.getcwd.__doc__
614 getcwd = staticmethod(getcwd)
614 getcwd = staticmethod(getcwd)
615
615
616 def abspath(self):
616 def abspath(self):
617 return ifile(path.path.abspath(self))
617 return ifile(path.path.abspath(self))
618 abspath.__doc__ = path.path.abspath.__doc__
618
619
619 def normcase(self):
620 def normcase(self):
620 return ifile(path.path.normcase(self))
621 return ifile(path.path.normcase(self))
622 normcase.__doc__ = path.path.normcase.__doc__
621
623
622 def normpath(self):
624 def normpath(self):
623 return ifile(path.path.normpath(self))
625 return ifile(path.path.normpath(self))
626 normpath.__doc__ = path.path.normpath.__doc__
624
627
625 def realpath(self):
628 def realpath(self):
626 return ifile(path.path.realpath(self))
629 return ifile(path.path.realpath(self))
630 realpath.__doc__ = path.path.realpath.__doc__
627
631
628 def expanduser(self):
632 def expanduser(self):
629 return ifile(path.path.expanduser(self))
633 return ifile(path.path.expanduser(self))
634 expanduser.__doc__ = path.path.expanduser.__doc__
630
635
631 def expandvars(self):
636 def expandvars(self):
632 return ifile(path.path.expandvars(self))
637 return ifile(path.path.expandvars(self))
638 expandvars.__doc__ = path.path.expandvars.__doc__
633
639
634 def dirname(self):
640 def dirname(self):
635 return ifile(path.path.dirname(self))
641 return ifile(path.path.dirname(self))
642 dirname.__doc__ = path.path.dirname.__doc__
636
643
637 parent = property(dirname, None, None, path.path.parent.__doc__)
644 parent = property(dirname, None, None, path.path.parent.__doc__)
638
645
639 def splitpath(self):
646 def splitpath(self):
640 (parent, child) = path.path.splitpath(self)
647 (parent, child) = path.path.splitpath(self)
641 return (ifile(parent), child)
648 return (ifile(parent), child)
649 splitpath.__doc__ = path.path.splitpath.__doc__
642
650
643 def splitdrive(self):
651 def splitdrive(self):
644 (drive, rel) = path.path.splitdrive(self)
652 (drive, rel) = path.path.splitdrive(self)
645 return (ifile(drive), rel)
653 return (ifile(drive), rel)
654 splitdrive.__doc__ = path.path.splitdrive.__doc__
646
655
647 def splitext(self):
656 def splitext(self):
648 (filename, ext) = path.path.splitext(self)
657 (filename, ext) = path.path.splitext(self)
649 return (ifile(filename), ext)
658 return (ifile(filename), ext)
659 splitext.__doc__ = path.path.splitext.__doc__
650
660
651 if hasattr(path.path, "splitunc"):
661 if hasattr(path.path, "splitunc"):
652 def splitunc(self):
662 def splitunc(self):
653 (unc, rest) = path.path.splitunc(self)
663 (unc, rest) = path.path.splitunc(self)
654 return (ifile(unc), rest)
664 return (ifile(unc), rest)
665 splitunc.__doc__ = path.path.splitunc.__doc__
655
666
656 def _get_uncshare(self):
667 def _get_uncshare(self):
657 unc, r = os.path.splitunc(self)
668 unc, r = os.path.splitunc(self)
@@ -664,46 +675,59 b' class ifile(path.path):'
664
675
665 def joinpath(self, *args):
676 def joinpath(self, *args):
666 return ifile(path.path.joinpath(self, *args))
677 return ifile(path.path.joinpath(self, *args))
678 joinpath.__doc__ = path.path.joinpath.__doc__
667
679
668 def splitall(self):
680 def splitall(self):
669 return map(ifile, path.path.splitall(self))
681 return map(ifile, path.path.splitall(self))
682 splitall.__doc__ = path.path.splitall.__doc__
670
683
671 def relpath(self):
684 def relpath(self):
672 return ifile(path.path.relpath(self))
685 return ifile(path.path.relpath(self))
686 relpath.__doc__ = path.path.relpath.__doc__
673
687
674 def relpathto(self, dest):
688 def relpathto(self, dest):
675 return ifile(path.path.relpathto(self, dest))
689 return ifile(path.path.relpathto(self, dest))
690 relpathto.__doc__ = path.path.relpathto.__doc__
676
691
677 def listdir(self, pattern=None):
692 def listdir(self, pattern=None):
678 return [ifile(child) for child in path.path.listdir(self, pattern)]
693 return [ifile(child) for child in path.path.listdir(self, pattern)]
694 listdir.__doc__ = path.path.listdir.__doc__
679
695
680 def dirs(self, pattern=None):
696 def dirs(self, pattern=None):
681 return [ifile(child) for child in path.path.dirs(self, pattern)]
697 return [ifile(child) for child in path.path.dirs(self, pattern)]
698 dirs.__doc__ = path.path.dirs.__doc__
682
699
683 def files(self, pattern=None):
700 def files(self, pattern=None):
684 return [ifile(child) for child in path.path.files(self, pattern)]
701 return [ifile(child) for child in path.path.files(self, pattern)]
702 files.__doc__ = path.path.files.__doc__
685
703
686 def walk(self, pattern=None):
704 def walk(self, pattern=None):
687 for child in path.path.walk(self, pattern):
705 for child in path.path.walk(self, pattern):
688 yield ifile(child)
706 yield ifile(child)
707 walk.__doc__ = path.path.walk.__doc__
689
708
690 def walkdirs(self, pattern=None):
709 def walkdirs(self, pattern=None):
691 for child in path.path.walkdirs(self, pattern):
710 for child in path.path.walkdirs(self, pattern):
692 yield ifile(child)
711 yield ifile(child)
712 walkdirs.__doc__ = path.path.walkdirs.__doc__
693
713
694 def walkfiles(self, pattern=None):
714 def walkfiles(self, pattern=None):
695 for child in path.path.walkfiles(self, pattern):
715 for child in path.path.walkfiles(self, pattern):
696 yield ifile(child)
716 yield ifile(child)
717 walkfiles.__doc__ = path.path.walkfiles.__doc__
697
718
698 def glob(self, pattern):
719 def glob(self, pattern):
699 return map(ifile, path.path.glob(self, pattern))
720 return map(ifile, path.path.glob(self, pattern))
721 glob.__doc__ = path.path.glob.__doc__
700
722
701 if hasattr(os, 'readlink'):
723 if hasattr(os, 'readlink'):
702 def readlink(self):
724 def readlink(self):
703 return ifile(path.path.readlink(self))
725 return ifile(path.path.readlink(self))
726 readlink.__doc__ = path.path.readlink.__doc__
704
727
705 def readlinkabs(self):
728 def readlinkabs(self):
706 return ifile(path.path.readlinkabs(self))
729 return ifile(path.path.readlinkabs(self))
730 readlinkabs.__doc__ = path.path.readlinkabs.__doc__
707
731
708 def getmode(self):
732 def getmode(self):
709 return self.stat().st_mode
733 return self.stat().st_mode
General Comments 0
You need to be logged in to leave comments. Login now