pub fn new(
        path:   &Path,
        prefix: &'static str,
        file_size: u64,
        max_size: u64) -> FlatFileSet<P> {

        assert!(file_size >= max_size);

        if !path.exists() {
            fs::create_dir_all(path)
                .expect(&format!("Could not create {:?}", path));
        }

        // Find the range of files currently on disk
        let (min,max) = find_min_max_filenumbers(path, prefix);

        FlatFileSet {
            path:       PathBuf::from(path),
            prefix:     prefix,
            start_size: file_size,
            max_size:   max_size,
            files:       (min..max).map(|_| None).collect(),
            first_file: min,
            last_file:  max,

            phantom:    ::std::marker::PhantomData
        }
    }
/// Loads a fileset
///
/// max_size is the size _after_ which to stop writing
/// this means that files_size-max_size must be big enough to hold the largest possible write
Loads a fileset
max_size is the size _after_ which to stop writing
this means that files_size-max_size must be big enough to hold the largest possible write
Loads a fileset max_size is the size _after_ which to stop writing this means that files_size - max_size must be big enough to hold the largest possible write
pub fn new(
        path:   &Path,
        prefix: &'static str,
        file_size: u64,
        max_size: u64) -> FlatFileSet<P> {
        assert!(file_size >= max_size);
        if !path.exists() {
            fs::create_dir_all(path)
                .expect(&format!("Could not create {:?}", path));
        }
        // Find the range of files currently on disk
        let (min,max) = find_min_max_filenumbers(path, prefix);
        FlatFileSet {
            path:       PathBuf::from(path),
            prefix:     prefix,
            start_size: file_size,
            max_size:   max_size,
            files:       (min..max).map(|_| None).collect(),
            first_file: min,
            last_file:  max,
            phantom:    ::std::marker::PhantomData
        }
    }
pub fn new ( path : & Path , prefix : & ' static str , file_size : u64 , max_size : u64 ) -> FlatFileSet < P > { assert ! ( file_size max_size ) ; if ! path . exists ( ) { fs :: create_dir_all ( path ) . expect ( & format ! ( " " path ) ) ; } // Find the range of files currently on disk let ( min , max ) = find_min_max_filenumbers ( path , prefix ) ; FlatFileSet { path : PathBuf :: from ( path ) , prefix : prefix , start_size : file_size , max_size : max_size , files : ( min .. max ) . map ( | _ | None ) . collect ( ) , first_file : min , last_file : max , phantom : :: std :: marker :: PhantomData } }
Loads a fileset
max_size is the size _after_ which to stop writing
this means that files_size-max_size must be big enough to hold the largest possible write
Loads a fileset max_size is the size _after_ which to stop writing this means that files_size - max_size must be big enough to hold the largest possible write
path
&Path
prefix
&'static str
file_size
u64
max_size
u64
path
&Path
prefix
&'static str
file_size
u64
max_size
u64