Answers for "check file exist or not in golang"

Go
0

golang check if file exists

file, err := os.OpenFile(...)
if errors.Is(err, os.ErrNotExist) {
    // handle the case where the file doesn't exist
}
Posted by: Guest on October-10-2021

Code answers related to "check file exist or not in golang"

Browse Popular Code Answers by Language