Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Solved [New API] Save resources automatically

Comments in 'Plugin Development' started by EvolSoft, Jul 14, 2015.

  1. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Hi,
    I'm updating a plugin and I would like to know how can I save every file in resources folder of a phar plugin in the plugin folder.
    Thanks in advance :)
  2. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Is there a recursive way?
  3. onebone
    Offline

    onebone Notable Member Plugin Developer

    Joined:
    Aug 31, 2013
    Posts:
    330
    Plugins:
    7
    Minecraft User:
    onebone
    I have tried it before but if the file is '.phar', it doesn't work. (Error exactly)
    Maybe you could try using \Phar class. (Maybe very slow)
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,306
    Plugins:
    11
    Minecraft User:
    PEMapModder
    Try using RecursiveDirectoryIterator
    EvolSoft likes this.
  5. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12
    Thank you :)
  6. EvolSoft
    Offline

    EvolSoft Notable Member Plugin Developer

    Joined:
    Sep 10, 2014
    Posts:
    821
    Plugins:
    15
    Minecraft User:
    Flavius12

Share This Page

Advertisement