[fpc-pascal] GetTempFileName in Linux
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Oct 7 10:20:47 CEST 2010
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), is to use the format "<program>-<user>" as the
temp directory. See the listing of my /tmp/ directory.
-------------------------------
srwxr-xr-x 1 graemeg graemeg 0 2010-10-06 14:47 gedit.graemeg.3293794453
drwx------ 2 graemeg graemeg 4096 2010-09-28 09:19 keyring-tTwy4j
drwx------ 2 graemeg graemeg 4096 2010-10-06 16:29 mc-graemeg
drwx------ 2 root root 4096 2010-10-01 09:27 mc-root
drwx------ 2 gdm gdm 4096 2010-09-28 09:19 orbit-gdm
drwx------ 2 graemeg graemeg 4096 2010-10-07 09:07 orbit-graemeg
drwx------ 2 root root 4096 2010-10-01 09:27 orbit-root
drwx------ 2 graemeg graemeg 4096 2010-09-28 09:19 pulse-6W7jC4ahCwwh
drwx------ 2 gdm gdm 4096 2010-09-28 09:19 pulse-PKdhtXMmr18n
drwx------ 2 graemeg graemeg 4096 2010-09-28 09:19 ssh-ksaXcs1548
drwxr-xr-x 2 graemeg graemeg 4096 2010-10-07 09:05 TempDUnitFiles
-rw-r--r-- 1 graemeg graemeg 672364 2010-10-06 17:00 TMP00000.log
drwx------ 2 graemeg graemeg 4096 2010-09-28 09:19 virtual-graemeg.pm1Pse
-------------------------------
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net:8080/fpgui/
More information about the fpc-pascal
mailing list