1#!/usr/bin/python2 2# Copyright 2019 The ANGLE Project Authors. All rights reserved. 3# Use of this source code is governed by a BSD-style license that can be 4# found in the LICENSE file. 5# 6# Simple helper for use in 'gn' files to check if a file exists. 7 8from __future__ import print_function 9 10import os, shutil, sys 11 12 13def main(): 14 if len(sys.argv) != 2: 15 print("Usage: %s <path>" % sys.argv[0]) 16 sys.exit(1) 17 18 if os.path.exists(sys.argv[1]): 19 print("true") 20 else: 21 print("false") 22 sys.exit(0) 23 24 25if __name__ == '__main__': 26 main() 27