Struct respk::Package[][src]

pub struct Package { /* fields omitted */ }

Provides read and write access to resources in a respk package file.

Methods

impl Package
[src]

Open a package from a file.

If the file does not exist, it will be created.

Get the number of files in the package.

Get a list of resources in the package.

Get a resource by name.

Read the contents of a resource file.

Open a resource for reading.

This method allows you to stream a resource from disk and process the resource incrementally instead of waiting for the entire resource file to be read into memory. If you are able to use a streamed resource, this method is usually preferred over read().

Write the given data stream to a resource path.

Delete a resource from the package.

Auto Trait Implementations

impl Send for Package

impl !Sync for Package