[Lazarus] Safe temp file name
Graeme Geldenhuys
mailinglists at geldenhuys.co.uk
Wed Nov 25 17:29:38 CET 2015
On 2015-11-25 15:41, Rik van Kekem wrote:
> Why are the { and } actually removed?
>
> As far as I know they can be part of a filename on all OSes (or am I wrong?)
In tiOPF (the code I linked too), GUID's are used as an OID (Object ID),
and normally stored in a database field of type char(36). The { and }
was simply removed to save 2 bytes per record. I guess the "-" symbol
was left in place to make reading the OIDs (by a human) a bit easier -
most likely for debugging purposes only.
As for using the GUID value as a file name... I always followed the
example of tiOPF, but yes, modern file systems will allow the { and }
symbols in the file name without problem.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
My public PGP key: http://tinyurl.com/graeme-pgp
More information about the Lazarus
mailing list