1al_get_standard_path(3)    Library Functions Manual    al_get_standard_path(3)
2
3
4

NAME

6       al_get_standard_path
7

SYNOPSIS

9              #include <allegro5/allegro.h>
10
11              ALLEGRO_PATH *al_get_standard_path(int id)
12

DESCRIPTION

14       Gets a system path, depending on the id parameter.  Some of these paths
15       may be affected by the organization and application name, so be sure to
16       set those before calling this function.
17
18       The  paths are not guaranteed to be unique (e.g., SETTINGS and DATA may
19       be the same on some platforms), so you should be  sure  your  filenames
20       are  unique  if  you need to avoid naming collisions.  Also, a returned
21       path may not actually exist on the file system.
22
23       ALLEGRO_RESOURCES_PATH
24              If you bundle data in a location relative  to  your  executable,
25              then  you  should  use  this  path to locate that data.  On most
26              platforms, this is the directory that  contains  the  executable
27              file.
28
29              If  ran  from  an  OS  X app bundle, then this will point to the
30              internal resource  directory  (<bundle.app>/Contents/Resources).
31              To maintain consistency, if you put your resources into a direc‐
32              tory called “data” beneath the executable on some other platform
33              (like  Windows),  then you should also create a directory called
34              “data” under the OS X app bundle's resource folder.
35
36              You should not try to write to this path, as it is  very  likely
37              read-only.
38
39              If  you  install  your  resources in some other system directory
40              (e.g., in /usr/share or C:\ProgramData), then you are  responsi‐
41              ble for keeping track of that yourself.
42
43       ALLEGRO_TEMP_PATH
44              Path to the directory for temporary files.
45
46       ALLEGRO_USER_HOME_PATH
47              This  is  the  user's  home  directory.  You should not normally
48              write files into this directory  directly,  or  create  any  sub
49              folders  in  it, without explicit permission from the user.  One
50              practical application of this path would be to  use  it  as  the
51              starting place of a file selector in a GUI.
52
53       ALLEGRO_USER_DOCUMENTS_PATH
54              This location is easily accessible by the user, and is the place
55              to store documents and files that the user might want  to  later
56              open with an external program or transfer to another place.
57
58              You  should not save files here unless the user expects it, usu‐
59              ally by explicit permission.
60
61       ALLEGRO_USER_DATA_PATH
62              If your program saves any data that the  user  doesn't  need  to
63              access  externally, then you should place it here.  This is gen‐
64              erally the least intrusive place to store data.
65
66       ALLEGRO_USER_SETTINGS_PATH
67              If you are saving configuration files (especially  if  the  user
68              may  want to edit them outside of your program), then you should
69              place them here.
70
71       ALLEGRO_EXENAME_PATH
72              The full path to the executable.
73
74       Returns NULL on failure.   The  returned  path  should  be  freed  with
75       al_destroy_path(3).
76

SEE ALSO

78       al_set_app_name(3), al_set_org_name(3), al_destroy_path(3)
79
80
81
82Allegro reference manual                               al_get_standard_path(3)
Impressum