Example usage for com.badlogic.gdx Files local

List of usage examples for com.badlogic.gdx Files local

Introduction

In this page you can find the example usage for com.badlogic.gdx Files local.

Prototype

public FileHandle local(String path);

Source Link

Document

Convenience method that returns a FileType#Local file handle.

Usage

From source file:Generator.java

License:Open Source License

private static void renamePrefixes(String path, String prefix, String newPrefix) {
    Files files = new LwjglFiles();
    for (FileHandle fileHandle : files.local(path).list()) {
        if (fileHandle.name().startsWith(prefix)) {
            String newName = newPrefix + fileHandle.name().substring(prefix.length());
            println(fileHandle.name() + " -> " + newName);
            fileHandle.sibling(newName).write(fileHandle.read(), false);
            fileHandle.delete();/*from   w  w w  . j a v a  2  s.c  o  m*/
        }
    }
}