This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the page.

라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.


Create HDF5 file


file_id = H5F.create(filename)
file_id = H5F.create(name,flags,fcpl_id,fapl_id)


file_id = H5F.create(filename) creates the file specified by filename with default library properties if the file does not already exist.

file_id = H5F.create(name,flags,fcpl_id,fapl_id) creates the file specified by name. flags specifies whether to truncate the file, if it already exists, or to fail if the file already exists. flags can be specified by one of the following character vectors or their numeric equivalent:

'H5F_ACC_TRUNC'overwrite any existing file by the same name
'H5F_ACC_EXCL'do not overwrite an existing file

fcpl_id is the file creation property list identifier. fapl_id is the file access property list identifier. A value of 'H5P_DEFAULT' for either property list indicates that the library should use default values for the appropriate property list.


Create an HDF5 file called 'myfile.h5'.

fid = H5F.create('myfile.h5');

Create an HDF5 file called 'myfile.h5', overwriting any existing file by the same name. Default file access and file creation properties shall apply.

fcpl = H5P.create('H5P_FILE_CREATE');
fapl = H5P.create('H5P_FILE_ACCESS');
fid = H5F.create('myfile.h5','H5F_ACC_TRUNC',fcpl,fapl);
Was this topic helpful?