mirror of
https://github.com/Maschell/fuse-wiiu.git
synced 2024-11-21 22:29:15 +01:00
Formatting, optimize imports
This commit is contained in:
parent
2793c02246
commit
a3f9dcb648
@ -1,5 +1,13 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu;
|
||||
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.GroupFuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.GroupFuseContainerDefault;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.utils.FuseContainerWrapper;
|
||||
import de.mas.wiiu.jnus.utils.HashUtil;
|
||||
import de.mas.wiiu.jnus.utils.Utils;
|
||||
import org.apache.commons.cli.*;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.charset.Charset;
|
||||
@ -9,20 +17,6 @@ import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.commons.cli.CommandLine;
|
||||
import org.apache.commons.cli.CommandLineParser;
|
||||
import org.apache.commons.cli.DefaultParser;
|
||||
import org.apache.commons.cli.HelpFormatter;
|
||||
import org.apache.commons.cli.Option;
|
||||
import org.apache.commons.cli.Options;
|
||||
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.GroupFuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.GroupFuseContainerDefault;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.utils.FuseContainerWrapper;
|
||||
import de.mas.wiiu.jnus.utils.HashUtil;
|
||||
import de.mas.wiiu.jnus.utils.Utils;
|
||||
|
||||
public class Main {
|
||||
private static final String DEV_COMMON_KEY = "devcommon.key";
|
||||
private static final String COMMON_KEY = "common.key";
|
||||
@ -168,7 +162,7 @@ public class Main {
|
||||
}
|
||||
|
||||
RootFuseFS stub = new RootFuseFS(root);
|
||||
try {
|
||||
try {
|
||||
System.out.println("Mounting " + new File(inputPath).getAbsolutePath() + " to " + mount.getAbsolutePath());
|
||||
stub.mount(mount.toPath(), true, false);
|
||||
} finally {
|
||||
|
@ -1,13 +1,13 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
import de.mas.wiiu.jnus.utils.Utils;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
public class Settings {
|
||||
public static File disckeyPath = null;
|
||||
public static final byte[] retailCommonKeyHash = Utils.StringToByteArray("6A0B87FC98B306AE3366F0E0A88D0B06A2813313");
|
||||
public static final byte[] devCommonKeyHash = Utils.StringToByteArray("E191BFDB1232537D7DADEAD81F2A48FD6F188E02");
|
||||
public static File disckeyPath = null;
|
||||
public static File titlekeyPath = null;
|
||||
public static byte[] retailCommonKey = new byte[16];
|
||||
public static byte[] devCommonKey = new byte[16];
|
||||
|
@ -1,19 +1,14 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.utils.FuseContainerWrapper;
|
||||
import lombok.val;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
/**
|
||||
* Representation of a directory on the OS filesystem. For every children of this directory the FuseContainerWrapper is used to create children if needed.
|
||||
*
|
||||
|
@ -1,8 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import de.mas.wiiu.jnus.entities.FST.nodeentry.DirectoryEntry;
|
||||
import de.mas.wiiu.jnus.entities.FST.nodeentry.FileEntry;
|
||||
import de.mas.wiiu.jnus.entities.FST.nodeentry.NodeEntry;
|
||||
@ -17,6 +14,9 @@ import ru.serce.jnrfuse.FuseFillDir;
|
||||
import ru.serce.jnrfuse.struct.FileStat;
|
||||
import ru.serce.jnrfuse.struct.FuseFileInfo;
|
||||
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* FuseContainer implementation based on a FSTDataProvider.
|
||||
*
|
||||
|
@ -1,12 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
import jnr.ffi.Pointer;
|
||||
@ -17,11 +10,17 @@ import ru.serce.jnrfuse.FuseFillDir;
|
||||
import ru.serce.jnrfuse.struct.FileStat;
|
||||
import ru.serce.jnrfuse.struct.FuseFileInfo;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Optional;
|
||||
import java.util.function.BiFunction;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* Implementation of an FuseContainer which can hold serveral FuseContainers emulated as directories.
|
||||
*
|
||||
* @author Maschell
|
||||
*
|
||||
* @author Maschell
|
||||
*/
|
||||
public abstract class GroupFuseContainer implements FuseContainer {
|
||||
private final Map<String, FuseContainer> containerMap = new HashMap<>();
|
||||
|
@ -1,13 +1,13 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Default GroupFuseContainer implementation
|
||||
* @author Maschell
|
||||
*
|
||||
* @author Maschell
|
||||
*/
|
||||
public class GroupFuseContainerDefault extends GroupFuseContainer {
|
||||
|
||||
|
@ -1,9 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.NUSTitle;
|
||||
import de.mas.wiiu.jnus.NUSTitleLoaderLocalBackup;
|
||||
import de.mas.wiiu.jnus.entities.Ticket;
|
||||
@ -13,6 +9,10 @@ import de.mas.wiiu.jnus.fuse_wiiu.utils.TicketUtils;
|
||||
import de.mas.wiiu.jnus.implementations.FSTDataProviderNUSTitle;
|
||||
import de.mas.wiiu.jnus.utils.Utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
public class LocalBackupNUSTitleContainer extends GroupFuseContainer {
|
||||
|
||||
private File folder;
|
||||
|
@ -1,19 +1,19 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import de.mas.wiiu.jnus.NUSTitle;
|
||||
import de.mas.wiiu.jnus.NUSTitleLoaderLocal;
|
||||
import de.mas.wiiu.jnus.entities.TMD.TitleMetaData;
|
||||
import de.mas.wiiu.jnus.entities.Ticket;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.Settings;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.utils.TicketUtils;
|
||||
import de.mas.wiiu.jnus.implementations.FSTDataProviderNUSTitle;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.NUSTitle;
|
||||
import de.mas.wiiu.jnus.NUSTitleLoaderLocal;
|
||||
import de.mas.wiiu.jnus.entities.Ticket;
|
||||
import de.mas.wiiu.jnus.entities.TMD.TitleMetaData;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.Settings;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.utils.TicketUtils;
|
||||
import de.mas.wiiu.jnus.implementations.FSTDataProviderNUSTitle;
|
||||
|
||||
public class LocalNUSTitleContainer extends GroupFuseContainer {
|
||||
|
||||
private File folder;
|
||||
|
@ -1,14 +1,14 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FSTDataProviderLoader;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
import de.mas.wiiu.jnus.interfaces.FSTDataProvider;
|
||||
import lombok.val;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public class MultipleFSTDataProviderFuseContainer<T> extends GroupFuseContainer {
|
||||
private final File file;
|
||||
private final FSTDataProviderLoader<T> loader;
|
||||
|
@ -1,11 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.NUSTitleLoaderFST;
|
||||
import de.mas.wiiu.jnus.entities.FST.nodeentry.DirectoryEntry;
|
||||
import de.mas.wiiu.jnus.entities.FST.nodeentry.FileEntry;
|
||||
@ -17,6 +11,12 @@ import de.mas.wiiu.jnus.interfaces.FSTDataProvider;
|
||||
import de.mas.wiiu.jnus.interfaces.HasNUSTitle;
|
||||
import de.mas.wiiu.jnus.utils.FSTUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public class MultipleFSTDataProviderRecursiveFuseContainer<T> extends MultipleFSTDataProviderFuseContainer<T> {
|
||||
public MultipleFSTDataProviderRecursiveFuseContainer(Optional<FuseDirectory> parent, File input, FSTDataProviderLoader<T> loader) {
|
||||
super(parent, input, loader);
|
||||
|
@ -1,11 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
import de.mas.wiiu.jnus.NUSTitle;
|
||||
import de.mas.wiiu.jnus.entities.TMD.Content;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
||||
@ -16,6 +10,12 @@ import ru.serce.jnrfuse.FuseFillDir;
|
||||
import ru.serce.jnrfuse.struct.FileStat;
|
||||
import ru.serce.jnrfuse.struct.FuseFileInfo;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public class NUSTitleEncryptedFuseContainer implements FuseContainer {
|
||||
private final Optional<FuseDirectory> parent;
|
||||
private final NUSTitle title;
|
||||
|
@ -1,9 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.NUSTitle;
|
||||
import de.mas.wiiu.jnus.NUSTitleLoaderRemoteLocal;
|
||||
import de.mas.wiiu.jnus.entities.Ticket;
|
||||
@ -13,6 +9,10 @@ import de.mas.wiiu.jnus.fuse_wiiu.utils.TicketUtils;
|
||||
import de.mas.wiiu.jnus.implementations.FSTDataProviderNUSTitle;
|
||||
import de.mas.wiiu.jnus.utils.Utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
public class RemoteLocalBackupNUSTitleContainer extends GroupFuseContainer {
|
||||
|
||||
private File folder;
|
||||
|
@ -1,9 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.utils.WUDUtils;
|
||||
@ -15,6 +11,10 @@ import ru.serce.jnrfuse.FuseFillDir;
|
||||
import ru.serce.jnrfuse.struct.FileStat;
|
||||
import ru.serce.jnrfuse.struct.FuseFileInfo;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Optional;
|
||||
|
||||
public class WUDToWUDContainer implements FuseContainer {
|
||||
private final String filename;
|
||||
private final Optional<WiiUDisc> wudInfo;
|
||||
|
@ -1,12 +1,12 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.NUSTitleLoaderWoomy;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
import de.mas.wiiu.jnus.implementations.FSTDataProviderNUSTitle;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Optional;
|
||||
|
||||
public class WoomyNUSTitleContainer extends GroupFuseContainer {
|
||||
private final File file;
|
||||
|
||||
|
@ -1,12 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation.loader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.WUDLoader;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.Settings;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FSTDataProviderLoader;
|
||||
@ -15,13 +8,20 @@ import de.mas.wiiu.jnus.implementations.wud.WiiUDisc;
|
||||
import de.mas.wiiu.jnus.interfaces.FSTDataProvider;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public class WUDFSTDataProviderLoader implements FSTDataProviderLoader<WiiUDisc> {
|
||||
@Getter
|
||||
private static WUDFSTDataProviderLoader instance = new WUDFSTDataProviderLoader();
|
||||
|
||||
private static final WUDFSTDataProviderLoader instance = new WUDFSTDataProviderLoader();
|
||||
|
||||
private WUDFSTDataProviderLoader() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public List<FSTDataProvider> getDataProvider(WiiUDisc info) {
|
||||
List<FSTDataProvider> dps = new ArrayList<>();
|
||||
|
@ -1,12 +1,5 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.implementation.loader;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.WumadLoader;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.Settings;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FSTDataProviderLoader;
|
||||
@ -14,13 +7,20 @@ import de.mas.wiiu.jnus.implementations.wud.wumad.WumadInfo;
|
||||
import de.mas.wiiu.jnus.interfaces.FSTDataProvider;
|
||||
import lombok.Getter;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.text.ParseException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
public class WumadFSTDataProviderLoader implements FSTDataProviderLoader<WumadInfo> {
|
||||
@Getter
|
||||
private static WumadFSTDataProviderLoader instance = new WumadFSTDataProviderLoader();
|
||||
|
||||
private static final WumadFSTDataProviderLoader instance = new WumadFSTDataProviderLoader();
|
||||
|
||||
private WumadFSTDataProviderLoader() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Optional<WumadInfo> loadInfo(File input) {
|
||||
if (input != null && input.exists()) {
|
||||
|
@ -1,13 +1,13 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.interfaces;
|
||||
|
||||
import de.mas.wiiu.jnus.interfaces.FSTDataProvider;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.interfaces.FSTDataProvider;
|
||||
|
||||
public interface FSTDataProviderLoader<T> {
|
||||
public Optional<T> loadInfo(File input);
|
||||
Optional<T> loadInfo(File input);
|
||||
|
||||
public List<FSTDataProvider> getDataProvider(T info);
|
||||
List<FSTDataProvider> getDataProvider(T info);
|
||||
}
|
||||
|
@ -9,26 +9,26 @@ import ru.serce.jnrfuse.struct.FuseFileInfo;
|
||||
|
||||
/**
|
||||
* Simplified version of the FuseFS interface.
|
||||
*
|
||||
* @author Maschell
|
||||
*
|
||||
* @author Maschell
|
||||
*/
|
||||
public interface FuseContainer extends FuseDirectory {
|
||||
/**
|
||||
* Wrapper for the getattr function of the FuseFS interface.
|
||||
* When this function is called, the path will be relative to this FuseContainer
|
||||
*
|
||||
* <p>
|
||||
* Get file attributes.
|
||||
* <p>
|
||||
* Similar to stat(). The 'st_dev' and 'st_blksize' fields are
|
||||
* ignored. The 'st_ino' field is ignored except if the 'use_ino'
|
||||
* mount option is given.
|
||||
*/
|
||||
public int getattr(String path, FileStat stat);
|
||||
int getattr(String path, FileStat stat);
|
||||
|
||||
/**
|
||||
* Wrapper for the getattr function of the FuseFS interface.
|
||||
* When this function is called, the path will be relative to this FuseContainer
|
||||
*
|
||||
* <p>
|
||||
* File open operation
|
||||
* <p>
|
||||
* No creation (O_CREAT, O_EXCL) and by default also no
|
||||
@ -46,12 +46,12 @@ public interface FuseContainer extends FuseDirectory {
|
||||
*
|
||||
* @see jnr.constants.platform.OpenFlags
|
||||
*/
|
||||
public int open(String path, FuseFileInfo fi);
|
||||
int open(String path, FuseFileInfo fi);
|
||||
|
||||
/**
|
||||
* Wrapper for the readdir function of the FuseFS interface.
|
||||
* When this function is called, the path will be relative to this FuseContainer
|
||||
*
|
||||
* <p>
|
||||
* Read directory
|
||||
* <p>
|
||||
* This supersedes the old getdir() interface. New applications
|
||||
@ -71,12 +71,12 @@ public interface FuseContainer extends FuseDirectory {
|
||||
* is full (or an error happens) the filler function will return
|
||||
* '1'.
|
||||
*/
|
||||
public int readdir(String path, Pointer buf, FuseFillDir filter, @off_t long offset, FuseFileInfo fi);
|
||||
int readdir(String path, Pointer buf, FuseFillDir filter, @off_t long offset, FuseFileInfo fi);
|
||||
|
||||
/**
|
||||
* Wrapper for the getattr function of the FuseFS interface.
|
||||
* When this function is called, the path will be relative to this FuseContainer
|
||||
*
|
||||
* <p>
|
||||
* Read data from an open file
|
||||
* <p>
|
||||
* Read should return exactly the number of bytes requested except
|
||||
@ -86,17 +86,17 @@ public interface FuseContainer extends FuseDirectory {
|
||||
* value of the read system call will reflect the return value of
|
||||
* this operation.
|
||||
*/
|
||||
public int read(String path, Pointer buf, @size_t long size, @off_t long offset, FuseFileInfo fi);
|
||||
int read(String path, Pointer buf, @size_t long size, @off_t long offset, FuseFileInfo fi);
|
||||
|
||||
/**
|
||||
* This function will be called when ever the FuseContainer needs to update it's children.
|
||||
*/
|
||||
public void init();
|
||||
void init();
|
||||
|
||||
/**
|
||||
* This function will be called right before this FuseContainer won't be used anymore.
|
||||
*/
|
||||
public void deinit();
|
||||
void deinit();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
@ -4,16 +4,15 @@ import java.util.Optional;
|
||||
|
||||
/**
|
||||
* Representation of a directory.
|
||||
*
|
||||
* @author Maschell
|
||||
*
|
||||
* @author Maschell
|
||||
*/
|
||||
public interface FuseDirectory {
|
||||
|
||||
/**
|
||||
* Returns the parent of this FuseDirectory.
|
||||
*
|
||||
*
|
||||
* @return parent
|
||||
*/
|
||||
public Optional<FuseDirectory> getParent();
|
||||
Optional<FuseDirectory> getParent();
|
||||
}
|
||||
|
@ -1,18 +1,6 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.FSFuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.LocalBackupNUSTitleContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.LocalNUSTitleContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.MultipleFSTDataProviderFuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.MultipleFSTDataProviderRecursiveFuseContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.RemoteLocalBackupNUSTitleContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WUDToWUDContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.WoomyNUSTitleContainer;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.*;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.loader.WUDFSTDataProviderLoader;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.implementation.loader.WumadFSTDataProviderLoader;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseContainer;
|
||||
@ -20,6 +8,11 @@ import de.mas.wiiu.jnus.fuse_wiiu.interfaces.FuseDirectory;
|
||||
import de.mas.wiiu.jnus.implementations.wud.reader.WUDDiscReaderSplitted;
|
||||
import de.mas.wiiu.jnus.utils.Utils;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
|
||||
public class FuseContainerWrapper {
|
||||
|
||||
private final static String prefix = "[EMULATED] ";
|
||||
@ -45,19 +38,19 @@ public class FuseContainerWrapper {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
if (c.exists() && c.getName().endsWith(".woomy")) {
|
||||
|
||||
if (c.exists() && c.getName().endsWith(".woomy")) {
|
||||
result.put(prefix + c.getName(), new WoomyNUSTitleContainer(parent, c));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
if (c.exists() && c.getName().endsWith(".wumad")) {
|
||||
result.put(prefix + c.getName(), new MultipleFSTDataProviderFuseContainer<>(parent, c, WumadFSTDataProviderLoader.getInstance()));
|
||||
result.put(prefix + "[EXTRA] " + c.getName(), new MultipleFSTDataProviderRecursiveFuseContainer<>(parent, c, WumadFSTDataProviderLoader.getInstance()));
|
||||
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
if (checkWUD(result, parent, c)) {
|
||||
return result;
|
||||
}
|
||||
|
@ -1,13 +1,13 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.utils;
|
||||
|
||||
import de.mas.wiiu.jnus.entities.Ticket;
|
||||
import de.mas.wiiu.jnus.utils.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.file.Files;
|
||||
import java.util.Optional;
|
||||
|
||||
import de.mas.wiiu.jnus.entities.Ticket;
|
||||
import de.mas.wiiu.jnus.utils.FileUtils;
|
||||
|
||||
public class TicketUtils {
|
||||
public static Optional<Ticket> getTicket(File folder, File keyFolder, long titleID, byte[] commonKey) {
|
||||
File ticketFile = null;
|
||||
|
@ -1,16 +1,15 @@
|
||||
package de.mas.wiiu.jnus.fuse_wiiu.utils;
|
||||
|
||||
import de.mas.wiiu.jnus.WUDLoader;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.Settings;
|
||||
import de.mas.wiiu.jnus.implementations.wud.WiiUDisc;
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.PrintWriter;
|
||||
import java.io.StringWriter;
|
||||
import java.util.Optional;
|
||||
|
||||
import org.apache.commons.io.FilenameUtils;
|
||||
|
||||
import de.mas.wiiu.jnus.WUDLoader;
|
||||
import de.mas.wiiu.jnus.fuse_wiiu.Settings;
|
||||
import de.mas.wiiu.jnus.implementations.wud.WiiUDisc;
|
||||
|
||||
public class WUDUtils {
|
||||
public static Optional<WiiUDisc> loadWUDInfo(File file) {
|
||||
String FSfilename = file.getName();
|
||||
|
Loading…
Reference in New Issue
Block a user