Search in sources :

Example 1 with GwtFileHandle

use of com.badlogic.gdx.backends.gwt.GwtFileHandle in project libgdx by libgdx.

the class Preloader method list.

public FileHandle[] list(String url, String suffix) {
    Array<FileHandle> files = new Array<FileHandle>();
    for (String path : texts.keys()) {
        if (isChild(path, url) && path.endsWith(suffix)) {
            files.add(new GwtFileHandle(this, path, FileType.Internal));
        }
    }
    FileHandle[] list = new FileHandle[files.size];
    System.arraycopy(files.items, 0, list, 0, list.length);
    return list;
}
Also used : Array(com.badlogic.gdx.utils.Array) GwtFileHandle(com.badlogic.gdx.backends.gwt.GwtFileHandle) FileHandle(com.badlogic.gdx.files.FileHandle) GwtFileHandle(com.badlogic.gdx.backends.gwt.GwtFileHandle)

Example 2 with GwtFileHandle

use of com.badlogic.gdx.backends.gwt.GwtFileHandle in project libgdx by libgdx.

the class Preloader method list.

public FileHandle[] list(String url, FilenameFilter filter) {
    Array<FileHandle> files = new Array<FileHandle>();
    for (String path : texts.keys()) {
        if (isChild(path, url) && filter.accept(new File(url), path.substring(url.length() + 1))) {
            files.add(new GwtFileHandle(this, path, FileType.Internal));
        }
    }
    FileHandle[] list = new FileHandle[files.size];
    System.arraycopy(files.items, 0, list, 0, list.length);
    return list;
}
Also used : Array(com.badlogic.gdx.utils.Array) GwtFileHandle(com.badlogic.gdx.backends.gwt.GwtFileHandle) FileHandle(com.badlogic.gdx.files.FileHandle) GwtFileHandle(com.badlogic.gdx.backends.gwt.GwtFileHandle) File(java.io.File)

Example 3 with GwtFileHandle

use of com.badlogic.gdx.backends.gwt.GwtFileHandle in project libgdx by libgdx.

the class Preloader method list.

public FileHandle[] list(String url, FileFilter filter) {
    Array<FileHandle> files = new Array<FileHandle>();
    for (String path : texts.keys()) {
        if (isChild(path, url) && filter.accept(new File(path))) {
            files.add(new GwtFileHandle(this, path, FileType.Internal));
        }
    }
    FileHandle[] list = new FileHandle[files.size];
    System.arraycopy(files.items, 0, list, 0, list.length);
    return list;
}
Also used : Array(com.badlogic.gdx.utils.Array) GwtFileHandle(com.badlogic.gdx.backends.gwt.GwtFileHandle) FileHandle(com.badlogic.gdx.files.FileHandle) GwtFileHandle(com.badlogic.gdx.backends.gwt.GwtFileHandle) File(java.io.File)

Aggregations

GwtFileHandle (com.badlogic.gdx.backends.gwt.GwtFileHandle)3 FileHandle (com.badlogic.gdx.files.FileHandle)3 Array (com.badlogic.gdx.utils.Array)3 File (java.io.File)2