Having case-insensitive operations on files is normally a pretty dangerous thing. Filesystems get quite hair with respect to sensitivity. It'd probably be beneficial to explicitly define what "case insensitive" in this context means. From the code it appears to be "ascii case insensitive" but unicode-case-sensitivity is not considered (which is fine, but probably good to be explicit).