This commit is contained in:
LZX committed 2026-09-16 20:43:39 +08:00
1 parent 5efc778165
commit 59125d185c
64 files changed
+7912 -1393

No files matched your search

+3 -3
View File
@@ -217,7 +217,7 @@ class FileService {
String targetPath = p.join(destinationDir, baseName);
// 如果同名,自动生成副本名称(如 file(1).dart)
targetPath = await _getUniqueTargetPath(targetPath, entityType == FileSystemEntityType.directory);
targetPath = await getUniqueTargetPath(targetPath, entityType == FileSystemEntityType.directory);
if(entityType == FileSystemEntityType.directory) {
await _copyDirectory(Directory(sourcePath), Directory(targetPath));
@@ -237,7 +237,7 @@ class FileService {
return;
}
targetPath = await _getUniqueTargetPath(targetPath, entityType == FileSystemEntityType.directory);
targetPath = await getUniqueTargetPath(targetPath, entityType == FileSystemEntityType.directory);
if(entityType == FileSystemEntityType.directory) {
try {
@@ -271,7 +271,7 @@ class FileService {
}
//处理同名
Future<String> _getUniqueTargetPath(String originalPath, bool isDirectory) async {
Future<String> getUniqueTargetPath(String originalPath, bool isDirectory) async {
if(!await FileSystemEntity.isDirectory(originalPath) &&
!await FileSystemEntity.isFile(originalPath)) {
return originalPath;