Method new()
Initialize the class
Usage
NWBHDF5IO$new(path = NULL, mode = c("r", "w", "r+", "a", "w-", "x"), ...)
Arguments
path
Path to a '.nwb'
file
mode
Mode for opening the file
...
Other parameters passed to nwb$NWBHDF5IO
Method get_handler()
Get internal file handler. Please make sure you close the handler
correctly.
Usage
NWBHDF5IO$get_handler()
Returns
File handler, i.e. 'PyNWB' NWBHDF5IO
instance.
Open the connections, must be used together with $close
method.
For high-level method, see $with
# low-level method to open NWB file, for safer methods, see
# `container$with()` below
container$open()
data <- container$read()
# process data...
# Make sure the container is closed!
container$close()
}
Close the connections (low-level method, see 'with' method below)
Usage
NWBHDF5IO$close(close_links = TRUE)
Arguments
close_links
Whether to close all files linked to from this
file; default is true
Method close_linked_files()
Close all opened, linked-to files. 'MacOS'
and 'Linux'
automatically release the linked-to file after the linking file is
closed, but 'Windows'
does not, which prevents the linked-to
file from being deleted or truncated. Use this method to close all
opened, linked-to files.
Usage
NWBHDF5IO$close_linked_files()
Method read()
Read the 'NWB'
file from the 'IO' source. Please use along with
'$with'
method
Returns
'NWBFile'
container
Safe wrapper for reading and handling 'NWB'
file. See class examples.
Usage
NWBHDF5IO$with(expr, quoted = FALSE, envir = parent.frame())
Arguments
expr
R expression to evaluate
quoted
Whether expr
is quoted; default is false
envir
environment for expr
to evaluate; default is the
parent frame (see parent.frame
)
Returns
Whatever results generated by expr
Examples
\dontrun{container$with({
data <- container$read()
# process data
})
}
Method clone()
The objects of this class are cloneable with this method.
Usage
NWBHDF5IO$clone(deep = FALSE)
Arguments
deep
Whether to make a deep clone.