In the case of a hint (info), if piofs does not exist on the system, it
is perfectly O.K. to open the file and create it on the default file system.
So the code is actually portable. But it may not be what you expected.
Remember, info is only a hint and does not affect semantics and the
implementation could took liberty at interpreting the hints.
In the piofs:/foo case, the implementation will return an error. That
means your code will fail in system that does not support piofs, so the
code is not portable. But you know excatly what happened.
I am just pointing out the difference in the semantics, and not really
arguing which one is better.
The original hints is used to pass information about the user application
to the implementation, like the access pattern (read only, r/w, sequential,
random, etc) to help the implementation to make better decision in data
layout on disk, caching and such.
The orginal filename space, foo:/bar, syntax is to alone multiple
implementation coexist in a library, and allow the user to read/write
files from different implementation in the same application. My classic
example is to read/write tmp files on local disks or local parallel file
system and write out the time steps to a mass storage system for later
analysis.
-- parkson
-- Parkson Wong Address: Numerical Aerodynamic Simulation MRJ, Inc. NASA Ames Research Center M/S 258-6 Supercomputer Applications Segment Moffett Field, CA 94035-1000 e-mail: parkson@nas.nasa.gov Phone: (415)604-3988 Fax: (415)966-8669