ntfsanitise 0.1.0

Sanitise filenames for use on NTFS filesystems
Documentation

ntfsanitise

Unsafe forbidden Latest Version docs.rs MSRV License Coverage Pipeline Status

A tiny crate for sanitising filenames for use on NTFS filesystems.

The set of banned characters are exported as the constant BANNED.

Usage

use ntfsanitise::{sanitise, is_dirty, is_clean};

fn main() {
	let input = "unsuitable:filename?.txt";
	assert!(is_dirty(input));
	let sanitised = sanitise(input, "_");
	assert_eq!(sanitised, "unsuitable_filename_.txt");
	assert!(is_clean(sanitised));
}