Basics
Guides
API Reference
Basics
Guides
API Reference
[20:7] extends: EngineService
Wraps FXGL's FileSystemService (com.almasb.fxgl.io.FileSystemService), an EngineService that exposes file I/O wrapped in IOTask objects. Every read/write/list method returns an IOTask; call run() to execute synchronously or runAsync() to schedule on a background thread. All file names are paths relative to the application root (on desktop, the current working directory; on mobile, the private storage root). Reached at runtime via fxgl.getFileSystemService; obtain a wrapper via adopt.
FileSystemService (Ajo = null)
Creates a FileSystemService wrapper. Empty by default; the (Ajo) form wraps an existing instance from fxgl.getFileSystemService.
Ajo is an optional AussomJavaObject around a FileSystemService.adopt (object Ajo)
Wraps an existing FileSystemService AussomJavaObject.
Ajo is an AussomJavaObject around a FileSystemService.A new wrapper.exists (string PathName)
Returns true when a file or directory at the given path exists.
PathName is the path relative to root.A bool.createDirectoryTask (string DirName)
Returns an IOTask
that creates the named directory (and any missing parents) when run.
DirName is the directory path relative to root.An AussomJavaObject around an IOTaskwriteDataTask (object DataObj, string FileName)
Returns an IOTask
that binary-serializes Data to the named file when run. Data must be a Java Serializable.
DataObj is an AussomJavaObject around a Serializable.FileName is the destination file path relative to root.An AussomJavaObject around an IOTaskwriteTextLinesTask (object LinesObj, string FileName)
Returns an IOTask
that writes a list of text lines (joined with newlines) to the named file when run.
LinesObj is an AussomJavaObject around a ListFileName is the destination file path relative to root.An AussomJavaObject around an IOTaskreadDataTask (string FileName)
Returns an IOTask
that binary-deserializes the named file into an object when run.
FileName is the source file path relative to root.An AussomJavaObject around an IOTask.loadFileNamesTask (string DirName, bool Recursive)
Returns an IOTask<List
> that lists file names under the given directory. When recursive, descends into subdirectories.
DirName is the directory path relative to root.Recursive when true descends into subdirectories.An AussomJavaObject around an IOTask<ListloadFileNamesExtTask (string DirName, bool Recursive, object ExtensionsObj)
Returns an IOTask<List
> that lists file names under the given directory, restricted to files whose name ends with one of the supplied extensions.
DirName is the directory path relative to root.Recursive when true descends into subdirectories.ExtensionsObj is an AussomJavaObject around a ListAn AussomJavaObject around an IOTask<ListloadDirectoryNamesTask (string DirName, bool Recursive)
Returns an IOTask<List
> that lists directory names under the given directory.
DirName is the directory path relative to root.Recursive when true descends into subdirectories.An AussomJavaObject around an IOTask<ListloadLastModifiedFileTask (string DirName, bool Recursive)
Returns an IOTask
that loads the most recently modified file under the given directory by name, then deserializes it.
DirName is the directory path relative to root.Recursive when true descends into subdirectories.An AussomJavaObject around an IOTask.deleteFileTask (string FileName)
Returns an IOTask
that deletes the named file when run.
FileName is the file path relative to root.An AussomJavaObject around an IOTaskdeleteDirectoryTask (string DirName)
Returns an IOTask
that deletes the named directory (recursively) when run.
DirName is the directory path relative to root.An AussomJavaObject around an IOTask
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.