[fpc-pascal] GetTempFileName in Linux

Michael Van Canneyt michael at freepascal.org
Thu Oct 7 10:40:55 CEST 2010



On Thu, 7 Oct 2010, Graeme Geldenhuys wrote:

> On 6 October 2010 23:57, Jonathan <winelauncher.jonathan at googlemail.com> wrote:
>> Create a folder in the temp directory naming it after the user name. E.g /tmp/myusername/
>> Ensure only the owner can read and write in the folder.
>> Create a folder in "/tmp/myusername/" using your program name.
>> Then create your temp file. so you have "/tmp/myusername/programname/tmp01"
>
> The norm under my system, Ubuntu Linux 10.04 (and probably all other
> Linux systems too),

Aahhh.. Norms. Right. like all config files should go in ~/.config/, as
proposed 5 years ago, because ~/.program/ is "not the norm" (dumping a
successful 20-year old practise for no apparent good reason).

Meanwhile I'm still waiting for the first non-fpc app to write it's config
files in that directory (using Kubuntu, BTW). All other apps I use still 
happily write in ~/.program/

Same on Microsoft: 'every program must be installed under C:\program files\'.
Oh yes. Meanwhile more and more programs write NOT under C:\program files\
because it is more and more a pain in the *** with each new release of Windows.

So: Norms ? Thank you, but I'll pass on that and implement what I perceive as
simple and correct :-)

Michael.



More information about the fpc-pascal mailing list