Normally, I would expect H5Fopen/creat calls to do same as thier posix 
equivalents.

I went looking through posix man pages for exactly how either open or creat 
form the 'path' of the file.

Surely, if you pass "foo.h5", it will create "foo.h5" in $CWD of the process.

And, as another respondent mentioned, if you pass a full path, it will 
create/open the file at that full path.

But, what if you pass "../bar/foo.h5"? will posix create the file in a dir 
named 'bar' that is one level up from $CWD? I don't know and I couldn't find 
refs on the system I was on that actually explain/define that behavior?

I think for anything other than a file in $CWD, might need to write a tiny bit 
of code that takes whatever path you are starting with and then uses get_cwd() 
and 'joins' the path you are given to form an absolute path to actually open.

HTH.

Mark


From: Jianxin Chen <[email protected]<mailto:[email protected]>>
Reply-To: HDF Users Discussion List 
<[email protected]<mailto:[email protected]>>
Date: Monday, July 13, 2015 10:54 AM
To: HDF Users Discussion List 
<[email protected]<mailto:[email protected]>>
Subject: [Hdf-forum] H5 file directory

Hi, HDF Experts,


H5Fcreate creates a new file named name in the current directory.

How to create a HDF file in another directory?

How to specify a directory for a H5 file when calling H5Fopen?

Thanks in advance for any help!

JC
 ______________________________________________________
Jianxin Chen

_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://lists.hdfgroup.org/mailman/listinfo/hdf-forum_lists.hdfgroup.org
Twitter: https://twitter.com/hdf5

Reply via email to