Skip to contents

Size of an OLE stream

Usage

ole_size(ole, stream)

Arguments

ole

An ole_file object from ole_open(), or the path to a compound file, which is opened and parsed again on every call.

stream

Path to the stream: a character vector of names, such as c("storage", "stream"), a single string separating them with /, or a list holding one such path, such as ole_streams(ole)[1]. A string in a list is not split at /, so a list also reaches streams whose names contain /. Names are matched ignoring the case of the letters A to Z. ole_extract() reads a character vector differently: each element is a separate stream.

Value

The size in bytes, or 0 if the stream does not exist. Storages also have size 0.

Examples

ole <- ole_open(system.file("extdata", "example.cfb", package = "olereader"))
ole_size(ole, "data")
#> [1] 5000