diff --git a/automated_updates_data.json b/automated_updates_data.json index 88dd158d37e..61c60f49f9c 100644 --- a/automated_updates_data.json +++ b/automated_updates_data.json @@ -104,6 +104,10 @@ { "date": "2026-07-07", "summary": "Improved keyboard docs: added 'Key just pressed' (held vs one-frame) and 'Any key released' conditions, control-remapping note, and a reference list of valid key names" + }, + { + "date": "2026-08-29", + "summary": "Improved File system docs: documented missing expressions (User's Home folder, Game executable file, and DirectoryName/FileName/ExtensionName path-parsing) and clarified the async Delete a file action" } ] } diff --git a/docs/gdevelop5/all-features/filesystem/index.md b/docs/gdevelop5/all-features/filesystem/index.md index a53d7d5ad6a..7766ea98e05 100644 --- a/docs/gdevelop5/all-features/filesystem/index.md +++ b/docs/gdevelop5/all-features/filesystem/index.md @@ -184,7 +184,7 @@ It is advised to use the expressions for special folders (see below) to keep you --- -#### Delete a file +#### Delete a file (async) This action deletes the file at the given file path __asynchronously__. == Parameters == ** File path: ** The path on the file system where the file is located. @@ -204,6 +204,10 @@ This expression returns the operating system independent path to the _Documents_ This is the standard folder for storing documents. #### This games executable folder This expression returns the operating system independent path to the folder where your game is being executed from. +#### Game executable file +This expression returns the path to the game executable file itself (not just its folder). +#### User's Home folder +This expression returns the operating system independent path to the current user's _home_ folder (for example `C:\Users\Name` on Windows). #### Pictures folder This expression returns the operating system independent path to the _Pictures_ folder of the user that runs your game. This is the standard folder for storing images. @@ -217,6 +221,15 @@ This folder is used for storing application settings. This expression returns the operating system independent path delimiter character. ("\" on Windows and "/" on Linux and macOS). Use this expression to build cross-platform file paths that can be accessed on all supported operating systems. +These expressions extract parts of a file path (they take a path as their parameter and return a piece of it): + +#### Get directory name from a path +This expression returns the directories portion of a path, without the ending file name. +#### Get file name from a path +This expression returns the name of the file with its extension, if any. +#### Get the extension from a file path +This expression returns the extension of the file designated by the given path, including the leading period (for example `.txt`). + ## Example In order to save a screenshot to the _Pictures_ directory you could write: