Solved How to make folders inside plugin directory?

Discussion in 'Plugin Development' started by Steferich, Feb 2, 2019.

Thread Status:
Not open for further replies.
  1. Offline

    Steferich

    Hello,

    The title is self-explanatory.. I wanna make folders inside of my plugins' directory so I can put my configuration files in it. How do I do this? I tried doing it the same way you would make a .yml file, but without the .yml but then it just leaves a file and not a folder.

    Thanks in advance! :)

    Stefan
     
  2. Online

    timtower Administrator Administrator Moderator

    If you are using the default config then you don't need to make the directory yourself.
     
  3. Offline

    KarimAKL

    @Steferich Code? You should be able to make the folder if you make a file but without the file extension, also i think you should use 'folder.mkdir()' or 'folder.mkdirs()' instead of 'folder.createNewFile()'
     
  4. Offline

    Steferich

    I'm not using the default config, that is in the plugin directory itself. I want to create a folder through code in my plugin's directory which I can have my other configs in.

    Aaah thanks! It works perfectly fine :)

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Feb 2, 2019
  5. Offline

    Chr0mosom3

    @Steferich, please mark this thread as solved
     
Thread Status:
Not open for further replies.

Share This Page