I need a c++ algorithm that takes a file path like ..
c:\folder 1\Long folder name\Longer Folder name with.in itfsdaf\longFileName.somelongext
basically, any valid window file path...
and mangles it into a ISO9660 complient string (both standard and level 1 interchange).
The details of the specification are below..
There are a few restrictions in ISO9660 that you must know before you commence your CD-R or CD-RW creation:
All filenames and directory names must use Capital letters "A-Z", Digits "0-9" and Underscore "_";
The number of characters of filenames plus extensions must not exceed 30;
Directory names cannot have any extensions, and cannot exceed 30 characters
There are 3 levels under ISO9660 that has further restriction respectively:
ISO9660 Level 1 Interchange further restricts that file names cannot exceed 8, filename extensions cannot exceed 3 and directory names (no extension allowed) cannot exceed 8. All files must be contiguous, or cannot be recorded in interleave mode;
The algorithm must of course handle mangled name conflicts as well and generate the new mangled name.
I need to find an algorithm that I can legally use in my commercial application with no restriction. Does anyone know of source code to such an algorithm. I am aware that some of the gnu libraries have some But I dont think I can freely use them without credit etc.