Index

Package: Support.Paths

Description

package Support.Paths is

Subprograms & Entries

Add_Extension

function Add_Extension
( path, ext: String;
force: Boolean := False )
return String;

References:

support-paths.ads:7:14 (declaration)
audio_players.adb:158:39 (reference)
audio_players.adb:177:39 (reference)
support-paths.adb:45:14 (body)
support-paths.adb:59:9 (label)
tiles-indices.adb:259:32 (reference)
tiles-indices.adb:261:36 (reference)
tiles-indices.adb:342:33 (reference)
tiles-libraries-loading.adb:179:40 (reference)
tiles-libraries-loading.adb:180:40 (reference)
worlds.adb:133:39 (reference)
worlds.adb:745:39 (reference)
themes-keen.adb:74:40 (reference)
themes-keen.adb:76:44 (reference)

Calls:

Get_Extension defined at support-paths.ads:32:14
Support.Ends_With defined at support.ads:60:14
To_Lower defined at a-chahan.ads:68:13
If the path has no extension, or if 'force' is True then the path with the appended extension is returned. Otherwise, the path is returned as-is. The value for 'ext' should not include a leading '.' character.

Ancestor_Dir

function Ancestor_Dir
( fullpath, filename: String )
return String;

References:

support-paths.ads:20:14 (declaration)
support-paths.adb:63:14 (body)
support-paths.adb:69:9 (label)
If fullpath ends with filename, the ancestor part of fullpath that contains filename will be returned. Otherwise, fullpath will be returned. Example: fullpath => "C:\my_dir\something\file.dat" filename => "something\file.dat" returns "C:\my_dir\"

Executable_Extension

function Executable_Extension return String;

References:

support-paths.ads:24:14 (declaration)
support-paths.adb:73:14 (body)
Returns the file extension for executable files on the current OS.

Get_Directory

function Get_Directory
( path: String )
return String;

References:

support-paths.ads:28:14 (declaration)
resources.adb:451:44 (reference)
support-paths.adb:77:14 (body)
support-paths.adb:84:9 (label)
support-paths.adb:185:25 (reference)

Calls:

Index defined at a-strfix.ads:36:13
Slash defined at support-paths.ads:60:14
Returns the directory portion of a full path, including a directory separator at the end.

Get_Extension

function Get_Extension
( path: String )
return String;

References:

support-paths.ads:32:14 (declaration)
archives-zip_archives.adb:159:34 (reference)
archives.adb:42:69 (reference)
archives.adb:54:69 (reference)
audio_players-cache.adb:27:44 (reference)
audio_players-cache.adb:141:44 (reference)
support-paths.adb:50:16 (reference)
support-paths.adb:88:14 (body)
support-paths.adb:95:9 (label)
tiles-indices.adb:258:12 (reference)

Called by:

Add_Extension defined at support-paths.ads:7:14
Archives.Load_Archive defined at archives.ads:24:14
Archives.Load_Archive defined at archives.ads:19:14
Archives.Zip_Archives.Load_Bitmap defined at archives-zip_archives.ads:34:14
Audio_Players.Cache.Construct defined at audio_players-cache.ads:90:15
Audio_Players.Cache.Create_Audio_Resource defined at audio_players-cache.ads:42:14
Tiles.Indices.Get_Tile defined at tiles-indices.ads:61:14

Calls:

Support.Paths.Find_Extension defined at support-paths.adb:13:14
Returns the path's file extension without a leading dot character, or an empty string if the path has no file extension.

Get_Filename

function Get_Filename
( path: String )
return String;

References:

support-paths.ads:36:14 (declaration)
font_api-allegro_fonts.adb:32:54 (reference)
font_api-allegro_fonts.adb:33:72 (reference)
resources.adb:132:16 (reference)
resources.adb:248:50 (reference)
resources.adb:249:32 (reference)
resources.adb:258:40 (reference)
resources.adb:262:58 (reference)
resources.adb:263:40 (reference)
resources.adb:272:40 (reference)
resources.adb:315:29 (reference)
resources.adb:316:20 (reference)
resources.adb:322:64 (reference)
resources.adb:328:37 (reference)
resources.adb:329:28 (reference)
resources.adb:335:72 (reference)
resources.adb:448:16 (reference)
resources.adb:448:41 (reference)
resources.adb:451:69 (reference)
resources.adb:457:36 (reference)
support-paths.adb:99:14 (body)
support-paths.adb:106:9 (label)

Called by:

Font_API.Allegro_Fonts.Construct defined at font_api-allegro_fonts.ads:21:15
Font_API.Allegro_Fonts.Construct defined at font_api-allegro_fonts.ads:21:15
Resources.Find_On_Disk defined at resources.adb:284:14
Resources.Find_On_Disk defined at resources.adb:284:14
Resources.Find_On_Disk defined at resources.adb:284:14
Resources.Find_On_Disk defined at resources.adb:284:14
Resources.Find_On_Disk defined at resources.adb:284:14
Resources.Find_On_Disk defined at resources.adb:284:14
Resources.Get_Filename defined at resources.ads:59:14
Resources.Load_From_Disk defined at resources.adb:186:14
Resources.Load_From_Disk defined at resources.adb:186:14
Resources.Load_From_Disk defined at resources.adb:186:14
Resources.Load_From_Disk defined at resources.adb:186:14
Resources.Load_From_Disk defined at resources.adb:186:14
Resources.Load_From_Disk defined at resources.adb:186:14
Resources.Write_Path defined at resources.ads:110:14
Resources.Write_Path defined at resources.ads:110:14
Resources.Write_Path defined at resources.ads:110:14
Resources.Write_Path defined at resources.ads:110:14

Calls:

Index defined at a-strfix.ads:36:13
Slash defined at support-paths.ads:60:14
Returns the path's filename if it has one, otherwise an empty string is returned.

Home_Directory

function Home_Directory return String;

References:

support-paths.ads:40:14 (declaration)
applications.adb:265:33 (reference)
support-paths.adb:110:14 (body)

Called by:

Applications.Init defined at applications.ads:113:14
Returns the platform's home directory. The string will have a trailing directory separator.

Path_Append

function Path_Append
( basePath, extra: String )
return String;

References:

support-paths.ads:47:14 (declaration)
support-paths.adb:114:14 (body)
support-paths.adb:152:9 (label)

Calls:

Slash defined at support-paths.ads:60:14
Support.Paths.Path_Append.No_Leading defined at support-paths.adb:118:18
Support.Paths.Path_Append.No_Trailing defined at support-paths.adb:130:18
Appends 'extra' onto 'basePath', following path naming conventions by ensuring that extra one directory separator character is inserted between the two path parts. If both 'basePath' and 'extra' are empty then an empty string is returned, otherwise if 'basePath' is empty then 'extra' is returned, or if 'extra' is empty, then 'basePath' is returned.

Remove_Extension

function Remove_Extension
( path: String )
return String;

References:

support-paths.ads:51:14 (declaration)
support-paths.adb:156:14 (body)
support-paths.adb:163:9 (label)

Calls:

Support.Paths.Find_Extension defined at support-paths.adb:13:14
Returns a path without its file extension. If the path is a directory or the file has no extension, it will be returned as-is.

Set_Working_Directory

procedure Set_Working_Directory
( path: String := "" );

References:

support-paths.ads:57:15 (declaration)
engine.adb:20:9 (reference)
support-paths.adb:167:15 (body)
support-paths.adb:194:9 (label)

Called by:

Engine.Engine_Main defined at engine.ads:9:14

Calls:

Change_Dir defined at g-dirope.ads:81:14
Get_Directory defined at support-paths.ads:28:14
Support.OS.Executable_Path defined at support.ads:115:18
Sets the application's current working directory. If an empty string is given, the working directory will be set to the location of the application's executable, or if the executable is inside a Mac application bundle then the location of the Resources folder.

Slash

function Slash return String;

References:

support-paths.ads:60:14 (declaration)
support-paths.adb:78:48 (reference)
support-paths.adb:100:48 (reference)
support-paths.adb:151:42 (reference)
support-paths.adb:198:14 (body)
support-paths.adb:202:9 (label)
support-paths.ads:61:27 (reference)
applications-keen.adb:64:64 (reference)
Returns the current platform's directory separator character.

System_Font_Directory

function System_Font_Directory return String;

References:

support-paths.ads:64:14 (declaration)
support-paths.adb:206:14 (body)
Returns the current platform's directory for system fonts.