Subject: Re: [boost] [Filesystem] Add features to list all mount paths, determine mount path of a path
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2010-07-12 14:59:14
On 12.07.2010 22:32, Marius Stoica wrote:
> On Monday 12 July 2010 19:17:44 Daniel Trebbien wrote:
>> The basic idea is to have the ability to list mounted filesystems. I
>> then suggested that `basic_path` could be extended with a new member
>> (e.g.: `mount_path`) that will determine the mount path of the given
>> path, and add a function to iterate over all mount paths.
> That would be a very questionable feature. On unix there is a single
> filesystem. Things such as "mount paths" are supposed to be abstracted away.
> And what would be the "mount path of the given path" ? Such a path may have
> multiple mout points. Wich one do you return ? And why...? What would an use
> case for this feature ? Maby so you can display space usage? Maby you should
> add a function to do just that instead ?
> And why add a function to iterate over all mount points ? I think that only
> makes sense for iterating over windows drives.
Although mount points (or Windows drives) are not quite portable, I
think this feature would be useful. For instance, knowing whether two
paths point to a single device or not would allow for nice
optimizations. Recently I was surprised to discover that the standard
"rename" function doesn't work if the file to be renamed moves to
another device, and I had to manually copy&remove it.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk