mirrored from https://chromium.googlesource.com/angle/angle
- Notifications
You must be signed in to change notification settings - Fork 646
/
Copy pathfile_exists.py
26 lines (19 loc) · 573 Bytes
/
file_exists.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/python3
# Copyright 2019 The ANGLE Project Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# Simple helper for use in 'gn' files to check if a file exists.
from __future__ importprint_function
importos, shutil, sys
defmain():
iflen(sys.argv) !=2:
print("Usage: %s <path>"%sys.argv[0])
sys.exit(1)
ifos.path.exists(sys.argv[1]):
print("true")
else:
print("false")
sys.exit(0)
if__name__=='__main__':
main()