Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
フルパスの一部として2番目にマウントされたfsを持つディレクトリパスがあります。
使用するgetcwdと、すべてのアプリ構成に必要な相対パスではなく、2番目にマウントされたファイルシステムの絶対パスが返されます。
getcwd
pwdコードを見ると、xgetcwdどの呼び出しが呼び出されているかがわかりましたgetcwd。どのようにすればよいかは不明です。
pwd
xgetcwd
まず、次を使用して絶対パスを取得します。
char abspath[256] = ""; getcwd(abspath, 256);
次に、次を使用して相対パスを取得します。
strrchr(abspath, '/');