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

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 make_executable and is_executable locations 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
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..1060f1d04c2a8e4a19002bc975506930a4287388 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 stat
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, file_path):
+ os.chmod(file_path, stat.S_IXUSR)
qyearsley 2016/06/15 21:54:25 Not sure if it makes a difference, but currently e
+
+ def is_executable(self, file_path):
+ return os.access(file_path, os.X_OK)

Powered by Google App Engine
This is Rietveld 408576698