title: How to solve "OS Error: File exists, errno = 17" in flutter?
body: <p>I'm trying to download and save a file in the Downlaod directory, but every time I get this error:</p>
  <pre><code>I/flutter (21400): FileSystemException: Cannot create file, path = '/storage/emulated/0/Download/contratto.jpg' (OS Error: File exists, errno = 17)
  </code></pre>
  <p>But if I search this file in my storage I don't find it, I don't understand.</p>
  <p>In the Manifest I've all the permissions:</p>
  <pre><code>&lt;uses-permission android:name=&quot;android.permission.READ_EXTERNAL_STORAGE&quot; /&gt;
  &lt;uses-permission android:name=&quot;android.permission.WRITE_EXTERNAL_STORAGE&quot; /&gt;
  </code></pre>
  <p>I'm using ext_storage package to find the path, but even with path_provider I got the same error.
  This is my code:</p>
  <pre><code>static Future download(String url, String fileName, String extension) async {
      _checkPermission();
      String _localPath = await ExtStorage.getExternalStoragePublicDirectory(
          ExtStorage.DIRECTORY_DOWNLOADS);
      Dio dio = Dio();
      await dio.download(
        url,
        _localPath + &quot;/&quot; + fileName + &quot;.&quot; + extension,
      );
  }
  </code></pre>
  <p>I'm using Flutter 2.0.6.
  Any ideas?</p>
  <p>EDIT:
  The download works only the first time I save a file with a certain name, if I delete it and try to download it again I get this error. I've tried also to reinstall the app but I still get the error</p>