Deprecated: every function forwards to fs. Write import fs instead of import fs.file.
import fs.file
The fs.file package is deprecated. Everything in it now lives in fs, and each function here only calls its fs twin, so old programs keep compiling and behave the same. In new code write import fs and call fs.ReadText(path), fs.WriteText(path, text), fs.Copy(src, dst) and the rest straight from fs. file.FileInfo is the same type as fs.FileInfo, so values pass between the two without conversion.
To migrate, change import fs.file to import fs and replace each file. prefix with fs.. The names, arguments and results are exactly the same. See the fs page for the guides and the full description of each function.
Move old code to fs
Change import fs.file to import fs and the file. prefix of every call to fs.. Nothing else changes: file.ReadText(p) becomes fs.ReadText(p), file.Stat(p) becomes fs.Stat(p), and a variable declared as file.FileInfo may be passed wherever fs.FileInfo is expected.
Using both in one program
A program may import fs and fs.file together while it is being migrated. Both prefixes call the same code, so the results are identical, and the compiler does not treat the two FileInfo names as different types.