Search code examples
javalibgdx

Navigating a folder up?


I am wondering how I can navigate a folder up like shown here: https://github.com/libgdx/libgdx/wiki/Texture-packer#automatic-packing

I did exactly the same ../ but libgdx is registering .. as a folder and does not go up in the tree. However the docs are kinda old and might be outdated.

    TexturePacker.Settings settings = new TexturePacker.Settings();
    settings.maxWidth = 1024;
    settings.maxHeight = 1024;

    TexturePacker.process(settings, "../images",
            "../android/assets/tilesets/",
            "set01");

//Input file does not exist: C:\Programming\Java\LibGDX\Projects\CloneQuest\android\assets\..\images

The reason why I want this is because I want to have a image folder with all separate images outside the assets folder. Whenever the desktop application is run in it's current state it will pack the images into the assets folder. But these separate images won't be transferred to the jar or apk when making a build.


Solution

  • This is working, the output just prints it like this. Are you sure there is a folder images as a sibling of assets, as you can see you are in the assets folder C:\Programming\Java\LibGDX\Projects\CloneQuest\android\assets..

    Please provide your folder structure if you struggle.