Skip to main content

cloudillo_file/
lib.rs

1//! File subsystem. File storage, metadata, documents, etc.
2
3#![allow(dead_code)]
4
5pub mod apkg;
6pub(crate) mod audio;
7pub(crate) mod container;
8pub mod descriptor;
9pub(crate) mod duplicate;
10pub(crate) mod ffmpeg;
11pub mod filter;
12pub mod handler;
13pub mod image;
14pub mod management;
15pub(crate) mod pdf;
16pub mod perm;
17pub mod preset;
18pub mod settings;
19pub mod share;
20pub(crate) mod store;
21pub(crate) mod svg;
22pub mod sync;
23pub mod tag;
24pub(crate) mod variant;
25pub(crate) mod video;
26
27mod prelude;
28
29use std::sync::Arc;
30
31use container::ContainerCache;
32use prelude::*;
33
34/// Create a new container cache for registration in extensions
35pub fn new_container_cache() -> Arc<ContainerCache> {
36	Arc::new(ContainerCache::new())
37}
38
39pub fn register_settings(
40	registry: &mut cloudillo_core::settings::SettingsRegistry,
41) -> ClResult<()> {
42	settings::register_settings(registry)
43}
44
45pub fn init(app: &App) -> ClResult<()> {
46	app.scheduler.register::<image::ImageResizerTask>()?;
47	app.scheduler.register::<descriptor::FileIdGeneratorTask>()?;
48	app.scheduler.register::<video::VideoTranscoderTask>()?;
49	app.scheduler.register::<audio::AudioExtractorTask>()?;
50	app.scheduler.register::<pdf::PdfProcessorTask>()?;
51	Ok(())
52}
53
54// vim: ts=4