copy static method

Future<File?> copy(
  1. String filePath,
  2. String toFilePath
)

Implementation

static Future<File?> copy(String filePath,String toFilePath) async{
  if (!isFile(filePath)){
    return null;
  };

  File file = File(filePath);
  try {
    File toFile = await file.copy(toFilePath);
    return toFile;
  } catch (e) {
    print("FFile copy e = $e");
    return null;
  }

}