On Mon, Jan 22, 2018 at 10:11 PM, Matrix Neo <lanxis2372...@gmail.com> wrote: > > I want to get the mount point or device name (like /dev/sda1) by the > directory name. I try my best only to find syscall.Stat_t struct but there > is no field to > point the information i need. So is there any way to implement this ?
You neglected to say what kind of system you are running on. If you are using GNU/Linux, then as far as I know this information is not available using `stat`. You need to run the `findmnt` program or look in `/proc/self/mountinfo`. Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.