Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: FileExtension

[18:7] extends: FxObj

Wraps FXGL's FileExtension data class (com.almasb.fxgl.io.FileExtension). Holds a single file extension string (no leading dot is required but allowed -- the matcher uses endsWith). Used by FileSystemService to filter directory listings. Example: ext = new FileExtension("json"); svc.loadFileNamesExtTask("./", false, [ext.obj]).run();

Methods

  • FileExtension (Extension = null)

    Creates a new FileExtension for the given extension string. Pass null to construct an empty wrapper for adopt.

    • @p Extension is the extension string (e.g. "json", ".png"), or null.
  • adopt (object Ajo)

    Wraps an existing FileExtension AussomJavaObject.

    • @p Ajo is an AussomJavaObject around a FileExtension.
    • @r A new wrapper.
  • getExtension ()

    Returns the extension string.

    • @r A string.