Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(333)

Unified Diff: third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py

Issue 2066963002: Add file permissions to filesystem_mock (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: corrected filesystem make_executable to copy permissions to new file Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py
diff --git a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py
index 65a9bd8a0578494f4319768dc7550f6732110e33..b8c28d4f97a06e0f5590cd7700ea995e0af74e14 100644
--- a/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py
+++ b/third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem.py
@@ -28,6 +28,7 @@
"""Wrapper object for the file system / source tree."""
+import shutil
import codecs
import errno
import exceptions
@@ -274,3 +275,9 @@ class FileSystem(object):
def splitext(self, path):
"""Return (dirname + os.sep + basename, '.' + ext)"""
return os.path.splitext(path)
+
+ def make_executable(self, orig_path, new_path):
+ shutil.copymode(orig_path, new_path)
+
+ def is_executable(self, file_path):
+ return os.access(file_path, os.X_OK)
« no previous file with comments | « no previous file | third_party/WebKit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698