S
S
SatanistArtem2018-10-10 22:43:44
C++ / C#
SatanistArtem, 2018-10-10 22:43:44

How to find out the path to an executable file on C++ Mac OS?

It is necessary that the program finds the path to the executable file, checks for files in its location folder.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Saboteur, 2018-10-10
@saboteur_kiev

The question is not entirely clear. You give an example of what you want to do and what result to get.
Because for posix file systems, the location of the file and its presence is not necessary for an already open file, since the handler points to an inode and not a directory entry.

V
Vasily Melnikov, 2018-10-11
@BacCM

Well, the simplest and most cross-platform is to take the first parameter main - the path to the executable program.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question