Making a directory with .mkdir(); not working!

Discussion in 'Plugin Development' started by n31ln3t, Aug 31, 2013.

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

    n31ln3t

    Hi,

    Here is my code: http://pastebin.com/RhJnYuX1

    As you can see, I made a file and and used .mkdir() method on it, doesn't seem to generate a folder.
     
  2. Offline

    chasechocolate

    It should be: File fileFolder = getDataFolder().
     
  3. Offline

    ZeusAllMighty11

    getDataFolder() returns ".plugins/your plugin name/"
     
  4. Offline

    n31ln3t

    Thanks you both!

    I thought it returned the location of the bukkit file.

    Thanks so much again! :)

    Do you guys know if it's possible adding lines to the file inside the folder I made.

    for example

    int line1 = 1;
    file.write(line1, "grasshopper");

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 4, 2016
  5. Offline

    ZeusAllMighty11

    You'd need to use a FileWriter, but yeah.
     
Thread Status:
Not open for further replies.

Share This Page