mirror of
https://github.com/lacerta-doc/Lacerta.git
synced 2024-11-22 16:03:15 +00:00
移動したので元を削除
This commit is contained in:
parent
c9f3510745
commit
2c1f1c6828
|
@ -1,28 +0,0 @@
|
|||
package one.nem.lacerta.data.utils;
|
||||
|
||||
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.data.utils.UtilsRepo;
|
||||
public class UtilsImpl implements UtilsRepo{
|
||||
|
||||
private final Context applicationContext;
|
||||
|
||||
@Inject
|
||||
public UtilsImpl(@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,16 +0,0 @@
|
|||
package one.nem.lacerta.data.utils;
|
||||
|
||||
import dagger.Binds;
|
||||
import dagger.Module;
|
||||
import dagger.hilt.InstallIn;
|
||||
import one.nem.lacerta.data.utils.UtilsRepo;
|
||||
import one.nem.lacerta.data.utils.UtilsImpl;
|
||||
import dagger.hilt.components.SingletonComponent;
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent.class)
|
||||
abstract public class UtilsModule {
|
||||
|
||||
@Binds
|
||||
public abstract UtilsRepo bindUtils(UtilsImpl utilsImpl);
|
||||
}
|
|
@ -1,11 +0,0 @@
|
|||
package one.nem.lacerta.data.utils;
|
||||
|
||||
import java.nio.file.Path;
|
||||
|
||||
public interface UtilsRepo {
|
||||
|
||||
Path getExternalFilesDirPath(String type);
|
||||
|
||||
Path getExternalFilesDirPath();
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user