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