Re: [netcdfgroup] find filename from ncid

If the file was opened via any netCDF user open then netCDF could retain and provide that specified file/path named. That would be the intent of the user/developer and help the user.
Never mind rename.  Just help the user as best you can.  This isn't hard.

At 2:02 PM -0600 7/2/10, Russ Rew wrote:
Hi Dave,

 Is there a method to find the filename of an open netcdf file from the
 ncid.  The method ncinquire does not provide it.

No, there's no way to determine the name with which a file was opened
from the netCDF C, Fortran, or C++ API's.

If there was a way to get the file name, it would be wrong if the file
was renamed by another process after it was opened.  Maybe that's the
reason no such function exists.  Similarly, I think it's also not
possible to determine the name of the file associated with a file
descriptor returned by the Unix open() call (please correct me if I'm
wrong about this).

--Russ

_______________________________________________
netcdfgroup mailing list
netcdfgroup@xxxxxxxxxxxxxxxx
For list information or to unsubscribe, visit: http://*www.*unidata.ucar.edu/mailing_lists/


--
___________________________________________________________
Bruce Langdon
Plasma Theory Group, AX division
Lawrence Livermore National Laboratory, L-472
Livermore, CA 94550, US
blangdon@xxxxxxxx  (925) 422-5444



  • 2010 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the netcdfgroup archives: