Changeset 90043 in webkit


Ignore:
Timestamp:
Jun 29, 2011 2:22:52 PM (13 years ago)
Author:
eric@webkit.org
Message:

2011-06-29 Eric Seidel <eric@webkit.org>

Reviewed by Adam Barth.

Remove duplicate methods in filesystem.py
https://bugs.webkit.org/show_bug.cgi?id=63658

Looks like there was a bad merge at some point.

I also removed a bunch of redundant docstrings.

  • Scripts/webkitpy/common/system/filesystem.py:
Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r90040 r90043  
     12011-06-29  Eric Seidel  <eric@webkit.org>
     2
     3        Reviewed by Adam Barth.
     4
     5        Remove duplicate methods in filesystem.py
     6        https://bugs.webkit.org/show_bug.cgi?id=63658
     7
     8        Looks like there was a bad merge at some point.
     9
     10        I also removed a bunch of redundant docstrings.
     11
     12        * Scripts/webkitpy/common/system/filesystem.py:
     13
    1142011-06-29  Adam Barth  <abarth@webkit.org>
    215
  • trunk/Tools/Scripts/webkitpy/common/system/filesystem.py

    r89843 r90043  
    6868
    6969    def copyfile(self, source, destination):
    70         """Copies the contents of the file at the given path to the destination
    71         path."""
    7270        shutil.copyfile(source, destination)
    7371
    7472    def dirname(self, path):
    75         """Wraps os.path.dirname()."""
    7673        return os.path.dirname(path)
    7774
    7875    def exists(self, path):
    79         """Return whether the path exists in the filesystem."""
    8076        return os.path.exists(path)
    8177
     
    115111
    116112    def getcwd(self):
    117         """Wraps os.getcwd()."""
    118113        return os.getcwd()
    119114
    120115    def glob(self, path):
    121         """Wraps glob.glob()."""
    122116        return glob.glob(path)
    123117
    124118    def isabs(self, path):
    125         """Return whether the path is an absolute path."""
    126119        return os.path.isabs(path)
    127120
    128121    def isfile(self, path):
    129         """Return whether the path refers to a file."""
    130122        return os.path.isfile(path)
    131123
    132124    def isdir(self, path):
    133         """Return whether the path refers to a directory."""
    134125        return os.path.isdir(path)
    135126
    136127    def join(self, *comps):
    137         """Return the path formed by joining the components."""
    138128        return os.path.join(*comps)
    139129
    140130    def listdir(self, path):
    141         """Return the contents of the directory pointed to by path."""
    142131        return os.listdir(path)
    143132
     
    189178
    190179    def normpath(self, path):
    191         """Wraps os.path.normpath()."""
    192180        return os.path.normpath(path)
    193181
     
    199187
    200188    def open_text_file_for_writing(self, path, append=False):
    201         """Returns a file handle suitable for writing to."""
    202189        mode = 'w'
    203190        if append:
     
    250237
    251238    def rmtree(self, path):
    252         """Delete the directory rooted at path, empty or no."""
     239        """Delete the directory rooted at path, whether empty or not."""
    253240        shutil.rmtree(path, ignore_errors=True)
    254 
    255     def read_binary_file(self, path):
    256         """Return the contents of the file at the given path as a byte string."""
    257         with file(path, 'rb') as f:
    258             return f.read()
    259 
    260     def read_text_file(self, path):
    261         """Return the contents of the file at the given path as a Unicode string.
    262 
    263         The file is read assuming it is a UTF-8 encoded file with no BOM."""
    264         with codecs.open(path, 'r', 'utf8') as f:
    265             return f.read()
    266241
    267242    def split(self, path):
     
    274249
    275250    def write_binary_file(self, path, contents):
    276         """Write the contents to the file at the given location."""
    277251        with file(path, 'wb') as f:
    278252            f.write(contents)
Note: See TracChangeset for help on using the changeset viewer.