When working with files, it's very common to fetch the info about files and yet again os package becomes our saviour. In today's code snippet, We will see how to fetch file name, size, permission or mode, and check if it is a directory or a regular file -
Tuesday, September 27, 2022
Home
/
directory
/
File
/
Go
/
Golang
/
mode
/
OS
/
package
/
Permission
/
Programming
/
Regular
/
Size
/
Stats
/
Golang - Fetch file stats
Golang - Fetch file stats
by
Atul Singh
on
September 27, 2022
in
directory,
File,
Go,
Golang,
mode,
OS,
package,
Permission,
Programming,
Regular,
Size,
Stats
Tags
# directory
# File
About Atul Singh
I am a Data Consultant at a Canadian financial firm. My keen interests varies from Data Analytics, ML, Kubernetes, NLP to ETL.
I love to blog and travel in my spare time. If you’d like to get in touch, feel free to say hello through any of the social links.
Stats
Labels:
directory,
File,
Go,
Golang,
mode,
OS,
package,
Permission,
Programming,
Regular,
Size,
Stats
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment