Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
PojavLauncherTeam
GitHub Repository: PojavLauncherTeam/angle
Path: blob/main_old/scripts/file_exists.py
1693 views
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
8
from __future__ import print_function
9
10
import os, shutil, sys
11
12
13
def 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
25
if __name__ == '__main__':
26
main()
27
28