Solved Move files

Discussion in 'Plugin Development' started by Jozeth, Aug 23, 2013.

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

    Jozeth

    How do I move a .yml from the default plugin directory to another folder inside it.

    Example:
    warps.yml is in "/plugins/PLUGINNAME/" but I want to move it to "/plugins/PLUGINNAME/data/".

    How do I do it?
     
  2. Offline

    Bammerbom

    Jozeth How far I know you can't move files.
    Make a new file and copy the warps.
    Then delete the old.
     
    Jozeth likes this.
  3. Offline

    Tarestudio

    Jozeth
    You can use javas nio
    Path moveSourcePath = Paths.get( "plugins/PLUGINNAME/warps.yml" );
    Path moveTargetPath = Paths.get( "plugins/PLUGINNAME/data/warps.yml" );
    Files.move( moveSourcePath, moveTargetPath );
     
    rsod likes this.
Thread Status:
Not open for further replies.

Share This Page