Methods that serve as "interface" to DOS file name and/or extension retrieval and modification cannot contain DOS-specific characters - Windows native C-style strings are a too weak means to represent them (see the below CDos class declaration snippet).
A more robust way to represent, for instance, null-character (0x00), valid in all Spectrum platforms, should be created. Moreover, the C-style character arrays are unsafe - buffer overrun at stake!
It's thus suggested to create a new data type encapsulating both C-style character array (big enough to accommodate a valid Windows long name) along with the count of valid characters in it. To indicate the constrained usage, it's further suggested to name this data type CPathString.
Methods that serve as "interface" to DOS file name and/or extension retrieval and modification cannot contain DOS-specific characters - Windows native C-style strings are a too weak means to represent them (see the below CDos class declaration snippet).
A more robust way to represent, for instance, null-character (0x00), valid in all Spectrum platforms, should be created. Moreover, the C-style character arrays are unsafe - buffer overrun at stake!
It's thus suggested to create a new data type encapsulating both C-style character array (big enough to accommodate a valid Windows long name) along with the count of valid characters in it. To indicate the constrained usage, it's further suggested to name this data type CPathString.