pub(crate) fn next_file_index(
parquet_root: &Path,
asset: u32,
channel: u8,
date: NaiveDate,
) -> usizeExpand description
Scans a channel/day directory to find the next available Parquet file index.
Every entry whose name starts with part-<number> counts, including
.inprogress and quarantined files, so a new file never reuses their index. The
directory is created if it does not exist.
§Arguments
parquet_root- Root output directory.asset- Asset number for theasset<NNN>directory.channel- LabJack channel for thech<NN>directory.date- UTC date for the date directory.
§Returns
One more than the highest existing part index, or 1 for an empty directory.
§Panics
Panics if the directory cannot be created or read.