新しいインスタンスを生成できるようにした

This commit is contained in:
r-ca 2024-01-09 15:30:18 +09:00
parent 01e111bdd5
commit 36ecb3ab13
No known key found for this signature in database
GPG Key ID: 6A72911AC73464A9
2 changed files with 6 additions and 0 deletions

View File

@ -23,6 +23,7 @@ public interface FileManager {
boolean isReadable(); boolean isReadable();
// Get current instance // Get current instance
FileManager getCurrentInstance(); FileManager getCurrentInstance();
FileManager getNewInstance();
// Configure // Configure
FileManager enableAutoCreateParent(); FileManager enableAutoCreateParent();

View File

@ -139,6 +139,11 @@ public class FileManagerImpl implements FileManager {
return this; return this;
} }
@Override
public FileManager getNewInstance() {
return this.newInstance(this.rootDir, this.rootDir, this.autoCreateParent, this.disableRootDirCheck);
}
@Override @Override
public FileManager enableAutoCreateParent() { public FileManager enableAutoCreateParent() {
this.autoCreateParent = true; this.autoCreateParent = true;