hariprasadraja
10/3/2019 - 7:07 AM

go file is exist or not

checks if the file actualy exist or not

	fileInfo, err := os.Stat("test.txt")
	if os.IsNotExist(err) {
		log.Fatal("File does not exist.")
	}

	log.Println("File does exist. File information:", fileInfo)