Skip to content

Commit 95c36e1

Browse files
committed
Add docstring to change_dir_if_bundle
1 parent 3b19bce commit 95c36e1

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

src/ApplicationBuilder.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,21 @@ module App
2525

2626
using Compat
2727

28+
"""
29+
change_dir_if_bundle()
30+
31+
Change current working directory to the directory containing the App's
32+
resources.
33+
34+
The behavior of this function depends on how it's called. If this code is called
35+
from within an Application compiled by ApplicationBuilder it will `cd` to the
36+
directory containing the App's resources. Otherwise, it will do nothing.
37+
38+
Apps that access any files through relative paths should call this function in
39+
their `julia_main()`.
40+
"""
41+
function change_dir_if_bundle end
42+
2843
@static if Compat.Sys.isapple()
2944
if get(ENV, "COMPILING_APPLE_BUNDLE", "false") == "true"
3045
function change_dir_if_bundle()

0 commit comments

Comments
 (0)