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

Unified Diff: recipe_modules/shutil/api.py

Issue 1866313002: recipe engine: add tempfile and shutil modules (Closed) Base URL: https://github.com/luci/recipes-py.git@master
Patch Set: presubmit Created 4 years, 8 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: recipe_modules/shutil/api.py
diff --git a/recipe_modules/shutil/api.py b/recipe_modules/shutil/api.py
new file mode 100644
index 0000000000000000000000000000000000000000..5f6137bb7b1eb408dd0003c36659ef28054fad36
--- /dev/null
+++ b/recipe_modules/shutil/api.py
@@ -0,0 +1,16 @@
+# Copyright 2016 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from recipe_engine import recipe_api
+
+class ShutilApi(recipe_api.RecipeApi):
martiniss 2016/04/07 17:35:22 I'm uncomfortable having this, when we have the fi
Paweł Hajdan Jr. 2016/04/07 20:39:04 With shutil module here, we can move build-indepen
martiniss 2016/04/07 21:34:02 If you're volunteering, please add a TODO :) I was
Paweł Hajdan Jr. 2016/04/08 07:46:15 Added TODO and I plan to address it soon. My recip
+ def rmtree(self, path, **kwargs):
+ self.m.python.inline(
+ 'rmtree %s' % path,
+ """
+ import shutil, sys
+ shutil.rmtree(sys.argv[1])
+ """,
+ args=[path],
+ **kwargs)

Powered by Google App Engine
This is Rietveld 408576698