We break down how to get a file or directory “passport” via
os.Stat: what the
os.FileInfo interface is, how to read basic metadata (
Name(),
IsDir(),
Size(),
ModTime(),
Mode()), how to handle file system errors via
os.IsNotExist/
os.IsPermission, and how to apply this in practice (the
inspect utility, checking storage in TaskBox, checking a “regular file” via
IsRegular()).