mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2026-11-02 11:37:37 +00:00
パッケージ構成変更
This commit is contained in:
16 files changed
+40
-264
No files matched your search
@@ -1,30 +0,0 @@
|
||||
package one.nem.lacerta.utils.impl;
|
||||
|
||||
import android.content.Context;
|
||||
|
||||
import java.nio.file.Path;
|
||||
import java.util.Objects;
|
||||
|
||||
import javax.inject.Inject;
|
||||
|
||||
import dagger.hilt.android.qualifiers.ApplicationContext;
|
||||
|
||||
import one.nem.lacerta.utils.repository.FileUtils;
|
||||
|
||||
public class FileUtilsImpl implements FileUtils {
|
||||
|
||||
private final Context applicationContext;
|
||||
|
||||
@Inject
|
||||
public FileUtilsImpl(@ApplicationContext Context applicationContext) {
|
||||
this.applicationContext = applicationContext;
|
||||
}
|
||||
|
||||
public Path getExternalFilesDirPath(String type) {
|
||||
return Objects.requireNonNull(applicationContext.getExternalFilesDir(type)).toPath();
|
||||
}
|
||||
|
||||
public Path getExternalFilesDirPath() {
|
||||
return Objects.requireNonNull(applicationContext.getExternalFilesDir(null)).toPath();
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
package one.nem.lacerta.utils.module;
|
||||
|
||||
import dagger.Binds;
|
||||
import dagger.Module;
|
||||
import dagger.hilt.InstallIn;
|
||||
import dagger.hilt.components.SingletonComponent;
|
||||
import one.nem.lacerta.utils.repository.FileUtils;
|
||||
import one.nem.lacerta.utils.impl.FileUtilsImpl;
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent.class)
|
||||
abstract public class FileUtilsModule {
|
||||
|
||||
@Binds
|
||||
public abstract FileUtils bindFileUtils(FileUtilsImpl fileUtilsImpl);
|
||||
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package one.nem.lacerta.utils.repository;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
public interface FileUtils {
|
||||
|
||||
Path getExternalFilesDirPath(String type);
|
||||
|
||||
Path getExternalFilesDirPath();
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user