pub mod error;
pub mod meta;
pub mod pool;
pub mod reader;
pub mod unitig_index;

pub use error::{SKError, SKResult};
pub use meta::SKFileMeta;
pub use pool::{SKFilePool, SKFileWriter, SharedPool, create_token, create_token_with};
pub use reader::{SKFileIter, SKFileReader};
pub use unitig_index::{UnitigFileReader, UnitigFileWriter, build_unitig_idx, DEFAULT_BLOCK_BITS,
                       CanonicalKmerIter};

use std::path::{Path, PathBuf};

/// Append `suffix` to a path without altering any existing extension.
/// Uses raw `OsStr` concatenation to preserve non-UTF-8 path components.
pub(crate) fn append_path_suffix(path: &Path, suffix: &str) -> PathBuf {
    let mut s = path.as_os_str().to_owned();
    s.push(suffix);
    PathBuf::from(s)
}
