[fpc-pascal] Function for checking correct file name
Graeme Geldenhuys
graeme at geldenhuys.co.uk
Fri Sep 14 14:08:22 CEST 2012
On 12/09/12 19:51, Krzysztof wrote:
> Hi,
>
> Exists any multiplatform function which check if string contains not
> allowed characters (like < > / \ on windows) for filename?
Nothing in FPC as far as I know, but once again tiOPF does provide that.
Have a look at the tiUtils.pas unit in tiOPF v2. tiOPF is hosted on
SourceForge.net. You can browse the repository code online with a web
browser if you must.
The function you are looking for is tiIsFileNameValid()
I had a quick look. It can be copied and pasted (with one helper
function). There are no other tiOPF dependencies.
Regards,
- Graeme -
More information about the fpc-pascal
mailing list