/// Create new index from given folder path and use given identifier to
/// split up the index.
Create new index from given folder path and use given identifier to
split up the index.
Create new index from given folder path and use given identifier to split up the index .
pub(crate) fn new<P: AsRef<Path>>(folder_path: P, identifier: String) -> Result<Self, Error> {
        fs::create_dir_all(&folder_path)
            .map_err(|err| Error::CreateIndexFolder(folder_path.as_ref().to_path_buf(), err))?;
        Ok(Self {
            folder_path: folder_path.as_ref().to_path_buf(),
            identifier,
        })
    }
pub ( crate ) fn new < P : AsRef < Path > > ( folder_path : P , identifier : String ) -> Result < Self , Error > { fs :: create_dir_all ( & folder_path ) . map_err ( | err | Error :: CreateIndexFolder ( folder_path . as_ref ( ) . to_path_buf ( ) , err ) ) ? ; Ok ( Self { folder_path : folder_path . as_ref ( ) . to_path_buf ( ) , identifier , } ) }
Create new index from given folder path and use given identifier to
split up the index.
Create new index from given folder path and use given identifier to split up the index .
folder_path
P
identifier
String