Adding Peter Thatcher to the owners file.
[chromium-blink-merge.git] / build / android / pylib / utils / host_utils.py
blob580721f1275c5e19245c62676fb1ad114fc05aca
1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
5 import os
8 def GetRecursiveDiskUsage(path):
9 """Returns the disk usage in bytes of |path|. Similar to `du -sb |path|`."""
10 running_size = os.path.getsize(path)
11 if os.path.isdir(path):
12 for root, dirs, files in os.walk(path):
13 running_size += sum([os.path.getsize(os.path.join(root, f))
14 for f in files + dirs])
15 return running_size