OLU4WJ6TUM7NGS6HPFN7GLGUNNJ6GHYPRAJUXQUT3JYB4UTENA5QC FB52Z6Q67WXO3EZKP7JUBLGJ5GGD4YPKVSDXSTPBPQL4L2PLYKFQC CNOW2ADL6P5EEMXSNGULLPK7HYMEJYLGGA427GCHVITE4TTS4I2QC 7G3ZS2GTQWACS4XUAUMFXJFSU2UUHEX3WQWGG47WJQQWSZSTTCQQC SY4Q66QFFEQ2BPMJ5G7MSZPX52HM6QTHZXJWL2VVFB2JMWZQLJBQC IUNEILYQVZBJQDWXI6ZDBZ4CTSBAJXNCFBVVJQPVF4R2HU6WER6QC YG5HKTDQNQJITHQNYTDVNTC7EDFN4FBWZ7CGPWKWDS4J7G63KU3AC N4KJX6V6VGUCAA6AV3643E75ISVAI5WCG5JYSKBW4WI2UTHG6V3QC 6LNO63SLVXX3ZHLLFV7ERGAJQUTY5RUVL7YNULSPAKJDWWBKMEJAC MLIBPJMS3263BBE2JQJCWGOPHU7VU7J643GYNYCFZL7VV5N4NFLQC LFGE3AYDOBE4HCF6CMMUHKFBDMUZRTUJSXODS7NYRDY3OL7F3NVAC KQ4AXOPFYEDQKTX2IVYYMECBJNG7ELO2YIIHYRXMN2N4H2F62URQC TYK5XDMD7PSITQFFPHNLD3462EODC3FQIV5DCW5KA527FXIW7CTQC GUUVABH6U5PQEZZCG2BODU3O4TTDU7RGFS6KLVUDDHRDOXEO34XAC H2P4XVBRZOQWK6U4HVZIX4RM2VWBV6LUBPM4NYOHXNHAH3FU6PYAC SZPURUIENN5UGPXU732WLGAHKTJ6EB2OSP7D42AO25AR26FIEOEQC RX7JOQLRZDFZ43W7ARW5GAZBFKSXRXZZVX4CVO3HG32UBTRQCU4QC pub(crate) fn ensure_default() -> Result<(), Box<dyn Error>> {let entries = load()?.processors;if !entries.is_empty() {return Ok(());}let mut f = fs::File::create(path()?)?;f.write_all(r#"[[processors]]# Path to watch for new files, required.path = "/path/to/watch"# Command to run for every new file, required.command = ""# Arguments to the command above. %f is replaced with the filename.args = ["%f"]# Recursion depth of sub-directories to watch. Defaults to 0, meaning watching# only the parent directory itself. `nfp` will automatically pick up changes in# the directory tree.depth = 1# Prevents deletion of the file after processing.keep_file = true# Used for file producers with a habit of re-opening and overwriting files# several times in quick succession. This specifies a timeout in milliseconds to# wait after the file was last written and closed before calling a processing# command on it.debounce = 500# You can define multiple [[processors]] sections"#.as_bytes(),)?;f.sync_all()?;Ok(())}
You can have more than one `[[processors]]` sections.Options:- `depth` is a recursion depth of sub-directories to watch. Defaults to 0, meaning watching only the parent directory itself. `nfp` will automatically pick up changes in the directory tree.- `keep_file` prevents automatic deletion of a processed file.
- `debounce` is useful for producers with a habit of re-opening and overwriting files several times in quick succession. This specifies a timeout in milliseconds to wait after the file was last written and closed before calling a processing command on it.
The easiest way to create one is to run `nfp -e`, which will create a commented example if the config is not present.