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

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();
// Get current instance
FileManager getCurrentInstance();
FileManager getNewInstance();
// Configure
FileManager enableAutoCreateParent();

View File

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