title: FileSystemException: Cannot open file, path = 'storage/emulated/0/DCIM/docs/myPdf.pdf' (OS Error: Operation not permitted, errno = 1)
body: <p>I am trying to create a pdf document and write my data in that file. The data is a list of int or uint type. Able to do the same for images but not pdf or doc file. All permissions are given and it works for images. My code is below -</p>
  <pre><code>Future &lt;File&gt; createDocFile(Uint8List fileData, String type) async
  {
    File file = new File(&quot;.pdf&quot;);
    if(await PermissionHandler.checkPermission(Permission.storage)!=true){
      Url.toastShow(&quot;Storage permission not found.&quot;);
      await Permission.storage.request();
    }
    else {
      await file.writeAsBytes(fileData);
      print(&quot;PDF SAVED IN DEVICE&quot;);
      Url.toastShow(&quot;PDF saved in device&quot;,Colors.green);
    }    
  }
  
  </code></pre>