Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.turt2live.ponies.engine;
- /**
- * For better file management
- *
- * @author turt2live
- */
- public class File extends java.io.File {
- private static final long serialVersionUID = 7132240520683854795L;
- private static final java.io.File resources = Settings.saveDirectory;
- public File(java.io.File parent, java.io.File child){
- super(getPath(new java.io.File(parent, child.getPath())));
- }
- public File(java.io.File parent, String child){
- super(getPath(new java.io.File(parent, child)));
- }
- public File(String parent, String child){
- super(getPath(new java.io.File(parent, child)));
- }
- public File(java.io.File file){
- super(getPath(file));
- }
- public File(String path){
- super(getPath(new java.io.File(path)));
- }
- /**
- * Gets the local resource path
- *
- * @param file the java file
- * @return the Pony Gladiators file requested
- */
- private static String getPath(java.io.File file){
- return new File(resources, file).getPath();
- }
- /**
- * Unpacks the required contents to the directory
- */
- public static void unpack(){
- // TODO: Implement
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment