@capacitor/filesystem 5.1.4 → 5.1.5-nightly-20230925T150516.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -15,7 +15,7 @@ buildscript {
15
15
  }
16
16
  }
17
17
  dependencies {
18
- classpath 'com.android.tools.build:gradle:8.0.0'
18
+ classpath 'com.android.tools.build:gradle:8.1.1'
19
19
  if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
20
20
  classpath 'io.github.gradle-nexus:publish-plugin:1.3.0'
21
21
  }
@@ -31,10 +31,10 @@ if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
31
31
 
32
32
  android {
33
33
  namespace "com.capacitorjs.plugins.filesystem"
34
- compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 33
34
+ compileSdkVersion project.hasProperty('compileSdkVersion') ? rootProject.ext.compileSdkVersion : 34
35
35
  defaultConfig {
36
36
  minSdkVersion project.hasProperty('minSdkVersion') ? rootProject.ext.minSdkVersion : 22
37
- targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 33
37
+ targetSdkVersion project.hasProperty('targetSdkVersion') ? rootProject.ext.targetSdkVersion : 34
38
38
  versionCode 1
39
39
  versionName "1.0"
40
40
  testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
@@ -25,11 +25,14 @@ import Capacitor
25
25
  public typealias ProgressEmitter = (_ bytes: Int64, _ contentLength: Int64) -> Void
26
26
 
27
27
  public func readFile(at fileUrl: URL, with encoding: String?) throws -> String {
28
+ fileUrl.startAccessingSecurityScopedResource()
28
29
  if encoding != nil {
29
30
  let data = try String(contentsOf: fileUrl, encoding: .utf8)
31
+ fileUrl.stopAccessingSecurityScopedResource()
30
32
  return data
31
33
  } else {
32
34
  let data = try Data(contentsOf: fileUrl)
35
+ fileUrl.stopAccessingSecurityScopedResource()
33
36
  return data.base64EncodedString()
34
37
  }
35
38
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/filesystem",
3
- "version": "5.1.4",
3
+ "version": "5.1.5-nightly-20230925T150516.0",
4
4
  "description": "The Filesystem API provides a NodeJS-like API for working with files on the device.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
@@ -78,5 +78,6 @@
78
78
  },
79
79
  "publishConfig": {
80
80
  "access": "public"
81
- }
81
+ },
82
+ "gitHead": "02661377a54af8f014479e08ddec2807dca9f6b9"
82
83
  }