Recent

Author Topic: Muti-platform file-system navigation.  (Read 5911 times)

Человек_Борща

  • New Member
  • *
  • Posts: 33
    • My little IT world.
Muti-platform file-system navigation.
« on: January 13, 2015, 11:31:54 am »
Greetings!

I start writing application for several operating systems. The big problem for me, is file-system navigation, and I/O operations.

Can anybody explaing, how to use pathes in linux OS?
e.g. I doing DeleteFile('D:\File.txt') or TStrings.LoadFromFile('D:File.txt') in windows.

Other:
In linux where install my application?
How I can get path where application binary are located? e.g. ExtractFilePath(ParamStr(0))
Where the temporary folder?
With best regards, Alexandr.
_
OS: Windows 8.1 x64 / Ubuntu 14.02 x64
IDE: CodeTyphon 5.4 (win32-win64/win64) / FPC 3.1.1

Bart

  • Hero Member
  • *****
  • Posts: 5537
    • Bart en Mariska's Webstek
Re: Muti-platform file-system navigation.
« Reply #1 on: January 13, 2015, 12:02:07 pm »
Start at this wiki page

Bart

Человек_Борща

  • New Member
  • *
  • Posts: 33
    • My little IT world.
Re: Muti-platform file-system navigation.
« Reply #2 on: January 13, 2015, 12:33:25 pm »
Thanks.

How I can add some article to wiki, or translate some article?
With best regards, Alexandr.
_
OS: Windows 8.1 x64 / Ubuntu 14.02 x64
IDE: CodeTyphon 5.4 (win32-win64/win64) / FPC 3.1.1

mig-31

  • Sr. Member
  • ****
  • Posts: 306
Re: Muti-platform file-system navigation.
« Reply #3 on: January 13, 2015, 03:53:16 pm »
For Linux standard program installation path
1) for binary file /usr/bin
2) libraries (dll/so) /usr/lib or usr/lib64
3) application settings for user /home/<user name>/<.applicationname>(application name really starts with dot)

You can obtain paths by using FreePascal(Lazarus) functions, how told to you @Bard
Lazarus 2.2.6 - OpenSuse Leap 15.4, Mageia 8, CentOS 7

Leledumbo

  • Hero Member
  • *****
  • Posts: 8790
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Muti-platform file-system navigation.
« Reply #4 on: January 13, 2015, 05:23:41 pm »
2) libraries (dll/so) /usr/lib or usr/lib64
Recently /usr/lib32 also exists on 64-bit systems, where /usr/lib already contains 64-bit libraries, /usr/lib64 is simply a symlink to /usr/lib on such a system.

 

TinyPortal © 2005-2018