Title: [90043] trunk/Tools
Revision
90043
Author
[email protected]
Date
2011-06-29 14:22:52 -0700 (Wed, 29 Jun 2011)

Log Message

2011-06-29  Eric Seidel  <[email protected]>

        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:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (90042 => 90043)


--- trunk/Tools/ChangeLog	2011-06-29 21:20:08 UTC (rev 90042)
+++ trunk/Tools/ChangeLog	2011-06-29 21:22:52 UTC (rev 90043)
@@ -1,3 +1,16 @@
+2011-06-29  Eric Seidel  <[email protected]>
+
+        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:
+
 2011-06-29  Adam Barth  <[email protected]>
 
         Reviewed by Eric Seidel.

Modified: trunk/Tools/Scripts/webkitpy/common/system/filesystem.py (90042 => 90043)


--- trunk/Tools/Scripts/webkitpy/common/system/filesystem.py	2011-06-29 21:20:08 UTC (rev 90042)
+++ trunk/Tools/Scripts/webkitpy/common/system/filesystem.py	2011-06-29 21:22:52 UTC (rev 90043)
@@ -67,16 +67,12 @@
         return os.chdir(path)
 
     def copyfile(self, source, destination):
-        """Copies the contents of the file at the given path to the destination
-        path."""
         shutil.copyfile(source, destination)
 
     def dirname(self, path):
-        """Wraps os.path.dirname()."""
         return os.path.dirname(path)
 
     def exists(self, path):
-        """Return whether the path exists in the filesystem."""
         return os.path.exists(path)
 
     def files_under(self, path, dirs_to_skip=[], file_filter=None):
@@ -114,31 +110,24 @@
         return files
 
     def getcwd(self):
-        """Wraps os.getcwd()."""
         return os.getcwd()
 
     def glob(self, path):
-        """Wraps glob.glob()."""
         return glob.glob(path)
 
     def isabs(self, path):
-        """Return whether the path is an absolute path."""
         return os.path.isabs(path)
 
     def isfile(self, path):
-        """Return whether the path refers to a file."""
         return os.path.isfile(path)
 
     def isdir(self, path):
-        """Return whether the path refers to a directory."""
         return os.path.isdir(path)
 
     def join(self, *comps):
-        """Return the path formed by joining the components."""
         return os.path.join(*comps)
 
     def listdir(self, path):
-        """Return the contents of the directory pointed to by path."""
         return os.listdir(path)
 
     def mkdtemp(self, **kwargs):
@@ -188,7 +177,6 @@
         return os.stat(path).st_mtime
 
     def normpath(self, path):
-        """Wraps os.path.normpath()."""
         return os.path.normpath(path)
 
     def open_binary_tempfile(self, suffix):
@@ -198,7 +186,6 @@
         return f, temp_name
 
     def open_text_file_for_writing(self, path, append=False):
-        """Returns a file handle suitable for writing to."""
         mode = 'w'
         if append:
             mode = 'a'
@@ -249,21 +236,9 @@
                     raise e
 
     def rmtree(self, path):
-        """Delete the directory rooted at path, empty or no."""
+        """Delete the directory rooted at path, whether empty or not."""
         shutil.rmtree(path, ignore_errors=True)
 
-    def read_binary_file(self, path):
-        """Return the contents of the file at the given path as a byte string."""
-        with file(path, 'rb') as f:
-            return f.read()
-
-    def read_text_file(self, path):
-        """Return the contents of the file at the given path as a Unicode string.
-
-        The file is read assuming it is a UTF-8 encoded file with no BOM."""
-        with codecs.open(path, 'r', 'utf8') as f:
-            return f.read()
-
     def split(self, path):
         """Return (dirname, basename + '.' + ext)"""
         return os.path.split(path)
@@ -273,7 +248,6 @@
         return os.path.splitext(path)
 
     def write_binary_file(self, path, contents):
-        """Write the contents to the file at the given location."""
         with file(path, 'wb') as f:
             f.write(contents)
 
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to