refactor: rename getTempFilePath to getDocumentsDirectoryFilePath for clarity

This commit is contained in:
Udhay-Adithya
2025-07-21 21:54:02 +05:30
parent a1e6521153
commit 4e924fc946
2 changed files with 3 additions and 153 deletions

View File

@@ -34,9 +34,9 @@ Future<String?> getFileDownloadpath(String? name, String? ext) async {
return null;
}
Future<String?> getTempFilePath(String? name, String? ext) async {
final Directory tempDir = await getApplicationCacheDirectory();
name = name ?? getTempFileName();
Future<String?> getDocumentsDirectoryFilePath(String name, String? ext) async {
final Directory tempDir = await getApplicationDocumentsDirectory();
name = name;
ext = (ext != null) ? ".$ext" : "";
String path = '${tempDir.path}/$name$ext';
int num = 1;