Movatterモバイル変換


[0]ホーム

URL:


Google Git
Sign in
chromium /chromium /src /refs/heads/main /. /tools /remove_stale_files.py
blob: 5973fd57bc99e7e702346eb048985c599268c2b2 [file] [log] [blame] [edit]
#!/usr/bin/env python
# Copyright 2024 The Chromium Authors
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import os
import sys
defRemoveAllStaleFiles(paths):
"""Check if any stale files (e.g. old GCS archives) are on filesystem, and
remove them."""
for pathin paths:
try:
if os.path.exists(path)andnot os.path.isdir(path):
os.remove(path)
exceptOSError:
# Wrap OS calls in try/except in case another process touched this file.
pass
if __name__=='__main__':
RemoveAllStaleFiles(sys.argv[1:])

[8]ページ先頭

©2009-2025 Movatter.jp