% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hdf5CloseAll.R
\name{hdf5_close_file}
\alias{hdf5_close_file}
\title{Close all HDF5 handles for a specific file}
\usage{
hdf5_close_file(x)
}
\arguments{
\item{x}{An \code{HDF5Matrix} object, or a character string with the
path to the HDF5 file.}
}
\value{
Invisibly, the absolute path of the closed file.
}
\description{
Closes all open \code{HDF5Matrix} objects and HDF5 C library handles
associated with a single HDF5 file, without affecting other open files.
}
\examples{
\donttest{
fn1 <- tempfile(fileext = ".h5")
fn2 <- tempfile(fileext = ".h5")
A <- hdf5_create_matrix(fn1, "data/A", data = matrix(1:9, 3, 3))
B <- hdf5_create_matrix(fn2, "data/B", data = matrix(1:9, 3, 3))

# Close only fn1 — B remains open and usable
hdf5_close_file(fn1)
dim(B)   # still works

hdf5_close_all()
unlink(c(fn1, fn2))
}

}
\seealso{
\code{\link{hdf5_close_all}} to close all files at once.
}
