Hello, I’d like to know how can I get all the filesystems mounted in my PC. Ther is some function or I have to poll /dev or /fs directories??? Thanks you.
You mean in a program or from the command prompt in the shell?
From the shell you can just do a ‘df’ command.
Thanks Tim, I need to obtain them by program. Currently I’m polling /fs directory, but I want to know if there is another way.
“How can I [programmatically] get all the filesystems mounted in my PC?”
You know, this is an interesting question, and I haven’t found an answer. It’s obviously possible, otherwise df wouldn’t work. Certainly using stat() on the /fs directory is doable, but what if something was mounted somewhere else? I can’t figure out if any of the available “hardware query” functions would do the trick: hwi*, resmgr*, and rsrcdmgr* all look like candidates for the job, but I don’t know off hand how to make them do it. Maybe one of the iofunc* functions is a better choice, or some variation of stat().
Sorry I can’t help; I would like to know if anybody else has any ideas.
Sage Automation, Inc.