summaryrefslogtreecommitdiffstats
path: root/src/H5F.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1997-08-28 16:37:58 (GMT)
committerRobb Matzke <matzke@llnl.gov>1997-08-28 16:37:58 (GMT)
commit27078082978818bb1e284677639c1ebac45bf90a (patch)
tree187d2ceda4e7c15aeaa6fa9c8c05f50acbd58054 /src/H5F.c
parentae4e4231330459115827485b2896c992f904294d (diff)
downloadhdf5-27078082978818bb1e284677639c1ebac45bf90a.zip
hdf5-27078082978818bb1e284677639c1ebac45bf90a.tar.gz
hdf5-27078082978818bb1e284677639c1ebac45bf90a.tar.bz2
[svn-r44] ./src/H5D.c
I commented out a bunch of code in H5D_flush() so I could compile and link the test cases. If you commit your changes to that file, whatever they may be, I'll change H5D_flush() to use the new directory functions described below... ./src/H5G.c H5G_namei() ----------- Understands files without directories. The root object (directory or not) can be found by asking for `/' (or any equivalent absolute or relative name like `/.//.///' or `.//.///' (if the cwd is the root)) or by name like `/foo' (or any other equivalent absolute or relative name) if the object has a name message with the value `foo'. This function is used by most of the other H5G functions so they now understand directory-less files too. H5G_new() --------- Creates the root directory implicitly if it doesn't already exist, moving any previous non-directory root object into the new root directory before creating the requested directory within the root. The creation of the root directory happens first, regardless of whether the requested directory creation succeeds. Once the root directory is created it never disappears even if the file later has only one object. This "feature" can be used to force a file to have a root directory by saying something like: H5G_new (..., "/", ...); H5ECLEAR; /*we don't care about the H5E_EXISTS failure*/ The H5G_new() in the previous example fails because the root directory is created implicitly before we attempt to create the requested "/" directory. H5G_find() ---------- Understands files without directories. If there is no root object then this function is guaranteed to fail even if the request is for `/'. As mentioned for H5G_namei(), the root object can be retrieved with `/' or `/foo' (or equivalent absolute or relative names). H5G_insert() ------------ Understands files without directories and attempts to create such files when there is only one object. The root symbol table is created implicitly when necessary. A root object can be given a name message by the caller and then inserted with the name `/' or it can be inserted with the name `/foo' in which case H5G_insert() will set the name message to `foo'. H5G_modify() ------------ Understands files without directories. ./src/H5Fprivate.h Removed the root_type field from hdf5_file_t. ./src/H5Fprivate.h ./src/H5F.c Removed H5F_root_type() ./src/H5Fpublic.h Removed H5F_root_symtype_t. ./src/H5Oprivate.h ./src/H5O.c Added H5O_remove() which is currently a no-op.
Diffstat (limited to 'src/H5F.c')
-rw-r--r--src/H5F.c58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/H5F.c b/src/H5F.c
index bed46fd..3d8b570 100644
--- a/src/H5F.c
+++ b/src/H5F.c
@@ -336,7 +336,6 @@ H5F_new (void)
/* Create a root symbol slot */
f->root_sym = H5MM_xcalloc (1, sizeof (H5G_entry_t));
f->root_sym->type = H5G_NOTHING_CACHED;
- f->root_type=H5F_ROOT_NONE;
return f;
}
@@ -792,63 +791,6 @@ done:
FUNC_LEAVE(ret_value);
} /* end H5Fclose() */
-/*--------------------------------------------------------------------------
- NAME
- H5F_root_type
- PURPOSE
- Check the type of the root symbol-entry for a file.
- USAGE
- H5F_root_symtype_t_ H5F_root_type(fid)
- int32 fid; IN: File ID of file to query
- RETURNS
- Returns root symbol type on success, H5F_ROOT_ERROR on failure.
- DESCRIPTION
- This function retrieves the type of symbol-entry the root object in the
- file describes. Legimate values are:
- H5F_ROOT_NONE - Root-symbol table is empty, neither a dataset nor a directory is the root object
- H5F_ROOT_UNKNOWN - Don't know (yet) if the root object is a dataset or a directory
- H5F_ROOT_DATASET - Root object is a dataset
- H5F_ROOT_DIRECTORY - Root object is a directory
-
- This function is designed for internal use and should be modified to
- not return H5F_ROOT_UNKNOWN if it is made part of the public API.
-
- ERRORS
- H5E_ARGS - H5E_BADTYPE - Argument checking
- H5E_ATOM - H5E_BADATOM - Can't get the object for an atom
- MODIFICATIONS:
- Quincey Koziol, 13 Aug 1997
---------------------------------------------------------------------------*/
-H5F_root_symtype_t H5F_root_type(hatom_t fid)
-{
- hdf5_file_t *f=NULL; /* file struct for new file */
- H5F_root_symtype_t ret_value = H5F_ROOT_ERROR;
-
- FUNC_ENTER(H5F_root_type, H5F_init_interface, H5F_ROOT_ERROR);
-
- /* Clear errors and check args and all the boring stuff. */
- H5ECLEAR;
- if(H5Aatom_group(fid)!=H5_FILE)
- HGOTO_ERROR(H5E_ARGS, H5E_BADTYPE, FAIL);
-
- /* Get the file handle to close */
- if((f=H5Aatom_object(fid))==NULL)
- HGOTO_ERROR(H5E_ATOM, H5E_BADATOM, FAIL);
-
- ret_value=f->root_type;
-
-done:
- if(ret_value == H5F_ROOT_ERROR)
- { /* Error condition cleanup */
-
- }
-
- /* Normal function cleanup */
-
- FUNC_LEAVE(ret_value);
-} /* end H5F_root_type() */
-
-
/*-------------------------------------------------------------------------
* Function: H5F_block_read