Struct keeshond_datapack::source::FilesystemSource [−][src]
pub struct FilesystemSource { /* fields omitted */ }
Expand description
A Source that loads packages from the filesystem. This is a good source to use for development, or if you don’t care about packaging your data files into an archive.
Implementations
Creates a new FilesystemSource using the given directory to look for packages in
Trait Implementations
The path that this Source originates from. Only used for debug purposes.
Returns true if the Source has a package of the given name, otherwise returns false
Returns a list of all packages available in this Source. Do not call this repeatedly!
fn write_file<'a>(
&'a mut self,
package_name: &str,
pathname: &str
) -> Result<Box<dyn Write + 'a>, PackageError>
fn write_file<'a>(
&'a mut self,
package_name: &str,
pathname: &str
) -> Result<Box<dyn Write + 'a>, PackageError>
Returns a Write for the file at the given pathname.
fn iter_entries<'a>(
&'a mut self,
package_name: &str,
type_folder: &str
) -> Box<dyn Iterator<Item = Result<String, PackageError>> + 'a>
fn iter_entries<'a>(
&'a mut self,
package_name: &str,
type_folder: &str
) -> Box<dyn Iterator<Item = Result<String, PackageError>> + 'a>
Returns an iterator through the items in a given package, if the Source has said package
Returns the source’s trust level for the given package. Trusted sources are able to load resource types marked as requiring trust. Read more