Go’s standard library does not have a function solely intended to check if a file exists or not (like Python’s os.path.exists). What is the idiomatic way to do it?
Go’s standard library does not have a function solely intended to check if a
Share
To check if a file doesn’t exist, equivalent to Python’s
if not os.path.exists(filename):To check if a file exists, equivalent to Python’s
if os.path.exists(filename):