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

Unified Diff: slave/skia_slave_scripts/utils/file_utils.py

Issue 648353002: Remove Skia's forked buildbot code (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Address comment Created 6 years, 2 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: slave/skia_slave_scripts/utils/file_utils.py
diff --git a/slave/skia_slave_scripts/utils/file_utils.py b/slave/skia_slave_scripts/utils/file_utils.py
deleted file mode 100644
index 2bf2e5e09b099d38f41f381dec34fe1f00489d89..0000000000000000000000000000000000000000
--- a/slave/skia_slave_scripts/utils/file_utils.py
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/usr/bin/env python
-# Copyright (c) 2012 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.
-
-"""This module contains utilities related to file/directory manipulations."""
-
-import os
-import stat
-
-from common import chromium_utils
-
-
-def clear_directory(directory):
- """Attempt to clear the contents of a directory. This should only be used
- when the directory itself cannot be removed for some reason. Otherwise,
- chromium_utils.RemoveDirectory or create_clean_local_dir should be preferred.
- """
- for path in os.listdir(directory):
- abs_path = os.path.join(directory, path)
- if os.path.isdir(abs_path):
- chromium_utils.RemoveDirectory(abs_path)
- else:
- if not os.access(abs_path, os.W_OK):
- # Change the path to be writeable
- os.chmod(abs_path, stat.S_IWUSR)
- os.remove(abs_path)
-
-
-def create_clean_local_dir(directory):
- """If directory already exists, it is deleted and recreated."""
- if os.path.exists(directory):
- chromium_utils.RemoveDirectory(directory)
- print 'Creating directory: %s' % directory
- os.makedirs(directory)
« no previous file with comments | « slave/skia_slave_scripts/utils/download_from_bucket.py ('k') | slave/skia_slave_scripts/utils/file_utils_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698