blob: 7cd781a90ce67b9868fcbf136beff066d38d07f5 [file] [log] [blame]
Ben Murdoch097c5b22016-05-18 11:27:45 +01001#!/usr/bin/env python
2#
3# Copyright (c) 2012 Google Inc. All rights reserved.
4# Use of this source code is governed by a BSD-style license that can be
5# found in the LICENSE file.
6
7import os
8import sys
9
10"""Cross-platform touch."""
11
12for fname in sys.argv[1:]:
13 if os.path.exists(fname):
14 os.utime(fname, None)
15 else:
16 open(fname, 'w').close()