@capacitor/filesystem 8.1.1-dev.spm → 8.1.2

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.
@@ -10,12 +10,9 @@ Pod::Spec.new do |s|
10
10
  s.homepage = package['repository']['url']
11
11
  s.author = package['author']
12
12
  s.source = { :git => package['repository']['url'], :tag => "v#{s.version}" }
13
- s.source_files = [
14
- 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}',
15
- 'packages/capacitor-plugin/ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
16
- ]
13
+ s.source_files = 'ios/Sources/**/*.{swift,h,m,c,cc,mm,cpp}'
17
14
  s.ios.deployment_target = '15.0'
18
15
  s.dependency 'Capacitor'
19
- s.dependency 'IONFilesystemLib', spec='~> 1.1.0'
16
+ s.dependency 'IONFilesystemLib', spec='~> 1.1.1'
20
17
  s.swift_version = '5.1'
21
18
  end
package/Package.swift CHANGED
@@ -11,7 +11,7 @@ let package = Package(
11
11
  ],
12
12
  dependencies: [
13
13
  .package(url: "https://github.com/ionic-team/capacitor-swift-pm.git", from: "8.0.0"),
14
- .package(url: "https://github.com/ionic-team/ion-ios-filesystem.git", from: "1.1.0")
14
+ .package(url: "https://github.com/ionic-team/ion-ios-filesystem.git", from: "1.1.1")
15
15
  ],
16
16
  targets: [
17
17
  .target(
package/README.md CHANGED
@@ -171,6 +171,16 @@ const readFilePath = async () => {
171
171
 
172
172
  console.log("data:", contents);
173
173
  };
174
+
175
+ const appendBinaryData = async () => {
176
+ // Here's an example of appending binary data, which should be sent to the plugin
177
+ // as base64 encoded, and without providing any `Encoding`.
178
+ await Filesystem.appendFile({
179
+ path: "file.bin",
180
+ directory: Directory.Cache,
181
+ data: "VGhpcyBpcyBtZWFudCB0byByZXByZXNlbnQgYSBCaW5hcnkgRGF0YSBleGFtcGxlIGVuY29kZWQgaW4gQmFzZTY0Lg=="
182
+ });
183
+ };
174
184
  ```
175
185
 
176
186
  ## API
@@ -566,23 +576,23 @@ We recommend using the @capacitor/file-transfer plugin instead, in conjunction w
566
576
 
567
577
  #### WriteFileOptions
568
578
 
569
- | Prop | Type | Description | Default | Since |
570
- | --------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ | ----- |
571
- | **`path`** | <code>string</code> | The path of the file to write | | 1.0.0 |
572
- | **`data`** | <code>string \| Blob</code> | The data to write Note: Blob data is only supported on Web. | | 1.0.0 |
573
- | **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to store the file in | | 1.0.0 |
574
- | **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass <a href="#encoding">Encoding.UTF8</a> to write data as string | | 1.0.0 |
575
- | **`recursive`** | <code>boolean</code> | Whether to create any missing parent directories. | <code>false</code> | 1.0.0 |
579
+ | Prop | Type | Description | Default | Since |
580
+ | --------------- | ----------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------ | ----- |
581
+ | **`path`** | <code>string</code> | The path of the file to write | | 1.0.0 |
582
+ | **`data`** | <code>string \| Blob</code> | The data to write Note: Blob data is only supported on Web. | | 1.0.0 |
583
+ | **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to store the file in | | 1.0.0 |
584
+ | **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to write the file in. If not provided, binary data will be written. For this, you must provide data as base64 encoded, so that the plugin can decode it before writing to disk. If you do not provide encoding and use non-base64 data, an error will be thrown. Pass <a href="#encoding">Encoding.UTF8</a> to write data as string | | 1.0.0 |
585
+ | **`recursive`** | <code>boolean</code> | Whether to create any missing parent directories. | <code>false</code> | 1.0.0 |
576
586
 
577
587
 
578
588
  #### AppendFileOptions
579
589
 
580
- | Prop | Type | Description | Since |
581
- | --------------- | ----------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
582
- | **`path`** | <code>string</code> | The path of the file to append | 1.0.0 |
583
- | **`data`** | <code>string</code> | The data to write | 1.0.0 |
584
- | **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to store the file in | 1.0.0 |
585
- | **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to write the file in. If not provided, data is written as base64 encoded. Pass <a href="#encoding">Encoding.UTF8</a> to write data as string | 1.0.0 |
590
+ | Prop | Type | Description | Since |
591
+ | --------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----- |
592
+ | **`path`** | <code>string</code> | The path of the file to append | 1.0.0 |
593
+ | **`data`** | <code>string</code> | The data to append | 1.0.0 |
594
+ | **`directory`** | <code><a href="#directory">Directory</a></code> | The <a href="#directory">`Directory`</a> to store the file in | 1.0.0 |
595
+ | **`encoding`** | <code><a href="#encoding">Encoding</a></code> | The encoding to append to the file. If not provided, binary data will be appended. For this, you must provide data as base64 encoded, so that the plugin can decode it before writing to disk. If you do not provide encoding and use non-base64 data, an error will be thrown. Pass <a href="#encoding">Encoding.UTF8</a> to write data as string | 1.0.0 |
586
596
 
587
597
 
588
598
  #### DeleteFileOptions
@@ -29,8 +29,8 @@ apply plugin: 'com.android.library'
29
29
  apply plugin: 'kotlin-android'
30
30
  if (System.getenv("CAP_PLUGIN_PUBLISH") == "true") {
31
31
  apply plugin: 'io.github.gradle-nexus.publish-plugin'
32
- apply from: file('../../../scripts/android/publish-root.gradle')
33
- apply from: file('../../../scripts/android/publish-module.gradle')
32
+ apply from: file('../scripts/android/publish-root.gradle')
33
+ apply from: file('../scripts/android/publish-module.gradle')
34
34
  }
35
35
 
36
36
  android {
@@ -46,7 +46,7 @@ android {
46
46
  buildTypes {
47
47
  release {
48
48
  minifyEnabled false
49
- proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
49
+ proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
50
50
  }
51
51
  }
52
52
  lintOptions {
package/dist/docs.json CHANGED
@@ -644,7 +644,7 @@
644
644
  "name": "since"
645
645
  }
646
646
  ],
647
- "docs": "The encoding to write the file in. If not provided, data\nis written as base64 encoded.\n\nPass Encoding.UTF8 to write data as string",
647
+ "docs": "The encoding to write the file in.\nIf not provided, binary data will be written. For this, you must provide data as base64 encoded,\nso that the plugin can decode it before writing to disk.\nIf you do not provide encoding and use non-base64 data, an error will be thrown.\n\nPass Encoding.UTF8 to write data as string",
648
648
  "complexTypes": [
649
649
  "Encoding"
650
650
  ],
@@ -695,7 +695,7 @@
695
695
  "name": "since"
696
696
  }
697
697
  ],
698
- "docs": "The data to write",
698
+ "docs": "The data to append",
699
699
  "complexTypes": [],
700
700
  "type": "string"
701
701
  },
@@ -721,7 +721,7 @@
721
721
  "name": "since"
722
722
  }
723
723
  ],
724
- "docs": "The encoding to write the file in. If not provided, data\nis written as base64 encoded.\n\nPass Encoding.UTF8 to write data as string",
724
+ "docs": "The encoding to append to the file.\nIf not provided, binary data will be appended. For this, you must provide data as base64 encoded,\nso that the plugin can decode it before writing to disk.\nIf you do not provide encoding and use non-base64 data, an error will be thrown.\n\nPass Encoding.UTF8 to write data as string",
725
725
  "complexTypes": [
726
726
  "Encoding"
727
727
  ],
@@ -136,8 +136,10 @@ export interface WriteFileOptions {
136
136
  */
137
137
  directory?: Directory;
138
138
  /**
139
- * The encoding to write the file in. If not provided, data
140
- * is written as base64 encoded.
139
+ * The encoding to write the file in.
140
+ * If not provided, binary data will be written. For this, you must provide data as base64 encoded,
141
+ * so that the plugin can decode it before writing to disk.
142
+ * If you do not provide encoding and use non-base64 data, an error will be thrown.
141
143
  *
142
144
  * Pass Encoding.UTF8 to write data as string
143
145
  *
@@ -160,7 +162,7 @@ export interface AppendFileOptions {
160
162
  */
161
163
  path: string;
162
164
  /**
163
- * The data to write
165
+ * The data to append
164
166
  *
165
167
  * @since 1.0.0
166
168
  */
@@ -172,8 +174,10 @@ export interface AppendFileOptions {
172
174
  */
173
175
  directory?: Directory;
174
176
  /**
175
- * The encoding to write the file in. If not provided, data
176
- * is written as base64 encoded.
177
+ * The encoding to append to the file.
178
+ * If not provided, binary data will be appended. For this, you must provide data as base64 encoded,
179
+ * so that the plugin can decode it before writing to disk.
180
+ * If you do not provide encoding and use non-base64 data, an error will be thrown.
177
181
  *
178
182
  * Pass Encoding.UTF8 to write data as string
179
183
  *
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,SA8FX;AA9FD,WAAY,SAAS;IACnB;;;;;;;;;;;OAWG;IACH,oCAAuB,CAAA;IAEvB;;;;;;;OAOG;IACH,0BAAa,CAAA;IAEb;;;;;;;OAOG;IACH,gCAAmB,CAAA;IAEnB;;;;;;OAMG;IACH,4BAAe,CAAA;IAEf;;;;;;;;;;OAUG;IACH,kCAAqB,CAAA;IAErB;;;;;;;;;;OAUG;IAEH,iDAAoC,CAAA;IACpC;;;;;;OAMG;IACH,6CAAgC,CAAA;IAEhC;;;;;OAKG;IACH,gDAAmC,CAAA;IAEnC;;;;;OAKG;IACH,oCAAuB,CAAA;AACzB,CAAC,EA9FW,SAAS,KAAT,SAAS,QA8FpB;AAED,MAAM,CAAN,IAAY,QAyBX;AAzBD,WAAY,QAAQ;IAClB;;;;OAIG;IACH,yBAAa,CAAA;IAEb;;;;;;OAMG;IACH,2BAAe,CAAA;IAEf;;;;;;OAMG;IACH,2BAAe,CAAA;AACjB,CAAC,EAzBW,QAAQ,KAAR,QAAQ,QAyBnB;AAooBD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC","sourcesContent":["import type { HttpOptions, PermissionState, PluginListenerHandle } from '@capacitor/core';\n\nexport type CallbackID = string;\n\nexport interface PermissionStatus {\n publicStorage: PermissionState;\n}\n\nexport enum Directory {\n /**\n * The Documents directory.\n * On iOS it's the app's documents directory.\n * Use this directory to store user-generated content.\n * On Android it's the Public Documents folder, so it's accessible from other apps.\n * It's not accessible on Android 10 unless the app enables legacy External Storage\n * by adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\n * in the `AndroidManifest.xml`.\n * On Android 11 or newer the app can only access the files/folders the app created.\n *\n * @since 1.0.0\n */\n Documents = 'DOCUMENTS',\n\n /**\n * The Data directory.\n * On iOS it will use the Documents directory.\n * On Android it's the directory holding application files.\n * Files will be deleted when the application is uninstalled.\n *\n * @since 1.0.0\n */\n Data = 'DATA',\n\n /**\n * The Library directory.\n * On iOS it will use the Library directory.\n * On Android it's the directory holding application files.\n * Files will be deleted when the application is uninstalled.\n *\n * @since 1.1.0\n */\n Library = 'LIBRARY',\n\n /**\n * The Cache directory.\n * Can be deleted in cases of low memory, so use this directory to write app-specific files.\n * that your app can re-create easily.\n *\n * @since 1.0.0\n */\n Cache = 'CACHE',\n\n /**\n * The external directory.\n * On iOS it will use the Documents directory.\n * On Android it's the directory on the primary shared/external\n * storage device where the application can place persistent files it owns.\n * These files are internal to the applications, and not typically visible\n * to the user as media.\n * Files will be deleted when the application is uninstalled.\n *\n * @since 1.0.0\n */\n External = 'EXTERNAL',\n\n /**\n * The external storage directory.\n * On iOS it will use the Documents directory.\n * On Android it's the primary shared/external storage directory.\n * It's not accessible on Android 10 unless the app enables legacy External Storage\n * by adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\n * in the `AndroidManifest.xml`.\n * It's not accessible on Android 11 or newer.\n *\n * @since 1.0.0\n */\n\n ExternalStorage = 'EXTERNAL_STORAGE',\n /**\n * The external cache directory.\n * On iOS it will use the Documents directory.\n * On Android it's the primary shared/external cache.\n *\n * @since 7.1.0\n */\n ExternalCache = 'EXTERNAL_CACHE',\n\n /**\n * The Library directory without cloud backup. Used in iOS.\n * On Android it's the directory holding application files.\n *\n * @since 7.1.0\n */\n LibraryNoCloud = 'LIBRARY_NO_CLOUD',\n\n /**\n * A temporary directory for iOS.\n * On Android it's the directory holding the application cache.\n *\n * @since 7.1.0\n */\n Temporary = 'TEMPORARY',\n}\n\nexport enum Encoding {\n /**\n * Eight-bit UCS Transformation Format\n *\n * @since 1.0.0\n */\n UTF8 = 'utf8',\n\n /**\n * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the\n * Unicode character set\n * This encoding is only supported on Android.\n *\n * @since 1.0.0\n */\n ASCII = 'ascii',\n\n /**\n * Sixteen-bit UCS Transformation Format, byte order identified by an\n * optional byte-order mark\n * This encoding is only supported on Android.\n *\n * @since 1.0.0\n */\n UTF16 = 'utf16',\n}\n\nexport interface WriteFileOptions {\n /**\n * The path of the file to write\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The data to write\n *\n * Note: Blob data is only supported on Web.\n *\n * @since 1.0.0\n */\n data: string | Blob;\n\n /**\n * The `Directory` to store the file in\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * The encoding to write the file in. If not provided, data\n * is written as base64 encoded.\n *\n * Pass Encoding.UTF8 to write data as string\n *\n * @since 1.0.0\n */\n encoding?: Encoding;\n\n /**\n * Whether to create any missing parent directories.\n *\n * @default false\n * @since 1.0.0\n */\n recursive?: boolean;\n}\n\nexport interface AppendFileOptions {\n /**\n * The path of the file to append\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The data to write\n *\n * @since 1.0.0\n */\n data: string;\n\n /**\n * The `Directory` to store the file in\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * The encoding to write the file in. If not provided, data\n * is written as base64 encoded.\n *\n * Pass Encoding.UTF8 to write data as string\n *\n * @since 1.0.0\n */\n encoding?: Encoding;\n}\n\nexport interface ReadFileOptions {\n /**\n * The path of the file to read\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to read the file from\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * The encoding to read the file in, if not provided, data\n * is read as binary and returned as base64 encoded.\n *\n * Pass Encoding.UTF8 to read data as string\n *\n * @since 1.0.0\n */\n encoding?: Encoding;\n\n /**\n * The offset to start reading the file from, in bytes.\n * Native only (not available in web).\n * Can be used in conjunction with length to partially read files.\n *\n * @since 8.1.0\n * @default 0\n */\n offset?: number;\n\n /**\n * The length of data to read, in bytes.\n * Any non-positive value means to read to the end of the file.\n * Native only (not available in web).\n * Can be used in conjunction with offset to partially read files.\n *\n * @since 8.1.0\n * @default -1\n */\n length?: number;\n}\n\nexport interface ReadFileInChunksOptions extends ReadFileOptions {\n /**\n * Size of the chunks in bytes.\n *\n * @since 7.1.0\n */\n chunkSize: number;\n}\n\nexport interface DeleteFileOptions {\n /**\n * The path of the file to delete\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to delete the file from\n *\n * @since 1.0.0\n */\n directory?: Directory;\n}\n\nexport interface MkdirOptions {\n /**\n * The path of the new directory\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to make the new directory in\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * Whether to create any missing parent directories as well.\n *\n * @default false\n * @since 1.0.0\n */\n recursive?: boolean;\n}\n\nexport interface RmdirOptions {\n /**\n * The path of the directory to remove\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to remove the directory from\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * Whether to recursively remove the contents of the directory\n *\n * @default false\n * @since 1.0.0\n */\n recursive?: boolean;\n}\n\nexport interface ReaddirOptions {\n /**\n * The path of the directory to read\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to list files from\n *\n * @since 1.0.0\n */\n directory?: Directory;\n}\n\nexport interface GetUriOptions {\n /**\n * The path of the file to get the URI for\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to get the file under\n *\n * @since 1.0.0\n */\n directory: Directory;\n}\n\nexport interface StatOptions {\n /**\n * The path of the file to get data about\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to get the file under\n *\n * @since 1.0.0\n */\n directory?: Directory;\n}\n\nexport interface CopyOptions {\n /**\n * The existing file or directory\n *\n * @since 1.0.0\n */\n from: string;\n\n /**\n * The destination file or directory\n *\n * @since 1.0.0\n */\n to: string;\n\n /**\n * The `Directory` containing the existing file or directory\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * The `Directory` containing the destination file or directory. If not supplied will use the 'directory'\n * parameter as the destination\n *\n * @since 1.0.0\n */\n toDirectory?: Directory;\n}\n\nexport type RenameOptions = CopyOptions;\n\nexport interface ReadFileResult {\n /**\n * The representation of the data contained in the file\n *\n * Note: Blob is only available on Web. On native, the data is returned as a string.\n *\n * @since 1.0.0\n */\n data: string | Blob;\n}\n\nexport interface WriteFileResult {\n /**\n * The uri where the file was written into\n *\n * @since 1.0.0\n */\n uri: string;\n}\n\nexport interface ReaddirResult {\n /**\n * List of files and directories inside the directory\n *\n * @since 1.0.0\n */\n files: FileInfo[];\n}\n\nexport interface FileInfo {\n /**\n * Name of the file or directory.\n *\n * @since 7.1.0\n */\n name: string;\n\n /**\n * Type of the file.\n *\n * @since 4.0.0\n */\n type: 'directory' | 'file';\n\n /**\n * Size of the file in bytes.\n *\n * @since 4.0.0\n */\n size: number;\n\n /**\n * Time of creation in milliseconds.\n *\n * It's not available on Android 7 and older devices.\n *\n * @since 7.1.0\n */\n ctime?: number;\n\n /**\n * Time of last modification in milliseconds.\n *\n * @since 7.1.0\n */\n mtime: number;\n\n /**\n * The uri of the file.\n *\n * @since 4.0.0\n */\n uri: string;\n}\n\nexport interface GetUriResult {\n /**\n * The uri of the file\n *\n * @since 1.0.0\n */\n uri: string;\n}\n\nexport type StatResult = FileInfo;\nexport interface CopyResult {\n /**\n * The uri where the file was copied into\n *\n * @since 4.0.0\n */\n uri: string;\n}\n\nexport interface DownloadFileOptions extends HttpOptions {\n /**\n * The path the downloaded file should be moved to.\n *\n * @since 5.1.0\n */\n path: string;\n /**\n * The directory to write the file to.\n * If this option is used, filePath can be a relative path rather than absolute.\n * The default is the `DATA` directory.\n *\n * @since 5.1.0\n */\n directory?: Directory;\n /**\n * An optional listener function to receive downloaded progress events.\n * If this option is used, progress event should be dispatched on every chunk received.\n * Chunks are throttled to every 100ms on Android/iOS to avoid slowdowns.\n *\n * @since 5.1.0\n */\n progress?: boolean;\n /**\n * Whether to create any missing parent directories.\n *\n * @default false\n * @since 5.1.2\n */\n recursive?: boolean;\n}\n\nexport interface DownloadFileResult {\n /**\n * The path the file was downloaded to.\n *\n * @since 5.1.0\n */\n path?: string;\n /**\n * The blob data of the downloaded file.\n * This is only available on web.\n *\n * @since 5.1.0\n */\n blob?: Blob;\n}\n\nexport interface ProgressStatus {\n /**\n * The url of the file being downloaded.\n *\n * @since 5.1.0\n */\n url: string;\n /**\n * The number of bytes downloaded so far.\n *\n * @since 5.1.0\n */\n bytes: number;\n /**\n * The total number of bytes to download for this file.\n *\n * @since 5.1.0\n */\n contentLength: number;\n}\n\n/**\n * Callback for receiving chunks read from a file, or error if something went wrong.\n *\n * @since 7.1.0\n */\nexport type ReadFileInChunksCallback = (chunkRead: ReadFileResult | null, err?: any) => void;\n\n/**\n * A listener function that receives progress events.\n *\n * @since 5.1.0\n */\nexport type ProgressListener = (progress: ProgressStatus) => void;\n\nexport interface FilesystemPlugin {\n /**\n * Check read/write permissions.\n * Required on Android, only when using `Directory.Documents` or\n * `Directory.ExternalStorage`.\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request read/write permissions.\n * Required on Android, only when using `Directory.Documents` or\n * `Directory.ExternalStorage`.\n *\n * @since 1.0.0\n */\n requestPermissions(): Promise<PermissionStatus>;\n\n /**\n * Read a file from disk\n *\n * @since 1.0.0\n */\n readFile(options: ReadFileOptions): Promise<ReadFileResult>;\n\n /**\n * Read a file from disk, in chunks.\n * Native only (not available in web).\n * Use the callback to receive each read chunk.\n * If empty chunk is returned, it means file has been completely read.\n *\n * @since 7.1.0\n */\n readFileInChunks(options: ReadFileInChunksOptions, callback: ReadFileInChunksCallback): Promise<CallbackID>;\n\n /**\n * Write a file to disk in the specified location on device\n *\n * @since 1.0.0\n */\n writeFile(options: WriteFileOptions): Promise<WriteFileResult>;\n\n /**\n * Append to a file on disk in the specified location on device\n *\n * @since 1.0.0\n */\n appendFile(options: AppendFileOptions): Promise<void>;\n\n /**\n * Delete a file from disk\n *\n * @since 1.0.0\n */\n deleteFile(options: DeleteFileOptions): Promise<void>;\n\n /**\n * Create a directory.\n *\n * @since 1.0.0\n */\n mkdir(options: MkdirOptions): Promise<void>;\n\n /**\n * Remove a directory\n *\n * @since 1.0.0\n */\n rmdir(options: RmdirOptions): Promise<void>;\n\n /**\n * Return a list of files from the directory (not recursive)\n *\n * @since 1.0.0\n */\n readdir(options: ReaddirOptions): Promise<ReaddirResult>;\n\n /**\n * Return full File URI for a path and directory\n *\n * @since 1.0.0\n */\n getUri(options: GetUriOptions): Promise<GetUriResult>;\n\n /**\n * Return data about a file\n *\n * @since 1.0.0\n */\n stat(options: StatOptions): Promise<StatResult>;\n\n /**\n * Rename a file or directory\n *\n * @since 1.0.0\n */\n rename(options: RenameOptions): Promise<void>;\n\n /**\n * Copy a file or directory\n *\n * @since 1.0.0\n */\n copy(options: CopyOptions): Promise<CopyResult>;\n\n /**\n * Perform a http request to a server and download the file to the specified destination.\n *\n * This method has been deprecated since version 7.1.0.\n * We recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.\n *\n * @since 5.1.0\n * @deprecated Use the @capacitor/file-transfer plugin instead.\n */\n downloadFile(options: DownloadFileOptions): Promise<DownloadFileResult>;\n\n /**\n * Add a listener to file download progress events.\n *\n * This method has been deprecated since version 7.1.0.\n * We recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.\n *\n * @since 5.1.0\n * @deprecated Use the @capacitor/file-transfer plugin instead.\n */\n addListener(eventName: 'progress', listenerFunc: ProgressListener): Promise<PluginListenerHandle>;\n\n /**\n * Remove all listeners for this plugin.\n *\n * This method has been deprecated since version 7.1.0.\n * We recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.\n *\n * @since 5.2.0\n * @deprecated Use the @capacitor/file-transfer plugin instead.\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * Structure for errors returned by the plugin.\n *\n * `code` follows \"OS-PLUG-FILE-XXXX\" format\n *\n * @since 1.0.0\n */\nexport type PluginError = {\n code: string;\n message: string;\n};\n\n/**\n * @deprecated Use `ReadFileOptions`.\n * @since 1.0.0\n */\nexport type FileReadOptions = ReadFileOptions;\n\n/**\n * @deprecated Use `ReadFileResult`.\n * @since 1.0.0\n */\nexport type FileReadResult = ReadFileResult;\n\n/**\n * @deprecated Use `WriteFileOptions`.\n * @since 1.0.0\n */\nexport type FileWriteOptions = WriteFileOptions;\n\n/**\n * @deprecated Use `WriteFileResult`.\n * @since 1.0.0\n */\nexport type FileWriteResult = WriteFileResult;\n\n/**\n * @deprecated Use `AppendFileOptions`.\n * @since 1.0.0\n */\nexport type FileAppendOptions = AppendFileOptions;\n\n/**\n * @deprecated Use `DeleteFileOptions`.\n * @since 1.0.0\n */\nexport type FileDeleteOptions = DeleteFileOptions;\n\n/**\n * @deprecated Use `Directory`.\n * @since 1.0.0\n */\nexport const FilesystemDirectory = Directory;\n\n/**\n * @deprecated Use `Encoding`.\n * @since 1.0.0\n */\nexport const FilesystemEncoding = Encoding;\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"AAQA,MAAM,CAAN,IAAY,SA8FX;AA9FD,WAAY,SAAS;IACnB;;;;;;;;;;;OAWG;IACH,oCAAuB,CAAA;IAEvB;;;;;;;OAOG;IACH,0BAAa,CAAA;IAEb;;;;;;;OAOG;IACH,gCAAmB,CAAA;IAEnB;;;;;;OAMG;IACH,4BAAe,CAAA;IAEf;;;;;;;;;;OAUG;IACH,kCAAqB,CAAA;IAErB;;;;;;;;;;OAUG;IAEH,iDAAoC,CAAA;IACpC;;;;;;OAMG;IACH,6CAAgC,CAAA;IAEhC;;;;;OAKG;IACH,gDAAmC,CAAA;IAEnC;;;;;OAKG;IACH,oCAAuB,CAAA;AACzB,CAAC,EA9FW,SAAS,KAAT,SAAS,QA8FpB;AAED,MAAM,CAAN,IAAY,QAyBX;AAzBD,WAAY,QAAQ;IAClB;;;;OAIG;IACH,yBAAa,CAAA;IAEb;;;;;;OAMG;IACH,2BAAe,CAAA;IAEf;;;;;;OAMG;IACH,2BAAe,CAAA;AACjB,CAAC,EAzBW,QAAQ,KAAR,QAAQ,QAyBnB;AAwoBD;;;GAGG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAE7C;;;GAGG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,QAAQ,CAAC","sourcesContent":["import type { HttpOptions, PermissionState, PluginListenerHandle } from '@capacitor/core';\n\nexport type CallbackID = string;\n\nexport interface PermissionStatus {\n publicStorage: PermissionState;\n}\n\nexport enum Directory {\n /**\n * The Documents directory.\n * On iOS it's the app's documents directory.\n * Use this directory to store user-generated content.\n * On Android it's the Public Documents folder, so it's accessible from other apps.\n * It's not accessible on Android 10 unless the app enables legacy External Storage\n * by adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\n * in the `AndroidManifest.xml`.\n * On Android 11 or newer the app can only access the files/folders the app created.\n *\n * @since 1.0.0\n */\n Documents = 'DOCUMENTS',\n\n /**\n * The Data directory.\n * On iOS it will use the Documents directory.\n * On Android it's the directory holding application files.\n * Files will be deleted when the application is uninstalled.\n *\n * @since 1.0.0\n */\n Data = 'DATA',\n\n /**\n * The Library directory.\n * On iOS it will use the Library directory.\n * On Android it's the directory holding application files.\n * Files will be deleted when the application is uninstalled.\n *\n * @since 1.1.0\n */\n Library = 'LIBRARY',\n\n /**\n * The Cache directory.\n * Can be deleted in cases of low memory, so use this directory to write app-specific files.\n * that your app can re-create easily.\n *\n * @since 1.0.0\n */\n Cache = 'CACHE',\n\n /**\n * The external directory.\n * On iOS it will use the Documents directory.\n * On Android it's the directory on the primary shared/external\n * storage device where the application can place persistent files it owns.\n * These files are internal to the applications, and not typically visible\n * to the user as media.\n * Files will be deleted when the application is uninstalled.\n *\n * @since 1.0.0\n */\n External = 'EXTERNAL',\n\n /**\n * The external storage directory.\n * On iOS it will use the Documents directory.\n * On Android it's the primary shared/external storage directory.\n * It's not accessible on Android 10 unless the app enables legacy External Storage\n * by adding `android:requestLegacyExternalStorage=\"true\"` in the `application` tag\n * in the `AndroidManifest.xml`.\n * It's not accessible on Android 11 or newer.\n *\n * @since 1.0.0\n */\n\n ExternalStorage = 'EXTERNAL_STORAGE',\n /**\n * The external cache directory.\n * On iOS it will use the Documents directory.\n * On Android it's the primary shared/external cache.\n *\n * @since 7.1.0\n */\n ExternalCache = 'EXTERNAL_CACHE',\n\n /**\n * The Library directory without cloud backup. Used in iOS.\n * On Android it's the directory holding application files.\n *\n * @since 7.1.0\n */\n LibraryNoCloud = 'LIBRARY_NO_CLOUD',\n\n /**\n * A temporary directory for iOS.\n * On Android it's the directory holding the application cache.\n *\n * @since 7.1.0\n */\n Temporary = 'TEMPORARY',\n}\n\nexport enum Encoding {\n /**\n * Eight-bit UCS Transformation Format\n *\n * @since 1.0.0\n */\n UTF8 = 'utf8',\n\n /**\n * Seven-bit ASCII, a.k.a. ISO646-US, a.k.a. the Basic Latin block of the\n * Unicode character set\n * This encoding is only supported on Android.\n *\n * @since 1.0.0\n */\n ASCII = 'ascii',\n\n /**\n * Sixteen-bit UCS Transformation Format, byte order identified by an\n * optional byte-order mark\n * This encoding is only supported on Android.\n *\n * @since 1.0.0\n */\n UTF16 = 'utf16',\n}\n\nexport interface WriteFileOptions {\n /**\n * The path of the file to write\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The data to write\n *\n * Note: Blob data is only supported on Web.\n *\n * @since 1.0.0\n */\n data: string | Blob;\n\n /**\n * The `Directory` to store the file in\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * The encoding to write the file in.\n * If not provided, binary data will be written. For this, you must provide data as base64 encoded,\n * so that the plugin can decode it before writing to disk.\n * If you do not provide encoding and use non-base64 data, an error will be thrown.\n *\n * Pass Encoding.UTF8 to write data as string\n *\n * @since 1.0.0\n */\n encoding?: Encoding;\n\n /**\n * Whether to create any missing parent directories.\n *\n * @default false\n * @since 1.0.0\n */\n recursive?: boolean;\n}\n\nexport interface AppendFileOptions {\n /**\n * The path of the file to append\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The data to append\n *\n * @since 1.0.0\n */\n data: string;\n\n /**\n * The `Directory` to store the file in\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * The encoding to append to the file.\n * If not provided, binary data will be appended. For this, you must provide data as base64 encoded,\n * so that the plugin can decode it before writing to disk.\n * If you do not provide encoding and use non-base64 data, an error will be thrown.\n *\n * Pass Encoding.UTF8 to write data as string\n *\n * @since 1.0.0\n */\n encoding?: Encoding;\n}\n\nexport interface ReadFileOptions {\n /**\n * The path of the file to read\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to read the file from\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * The encoding to read the file in, if not provided, data\n * is read as binary and returned as base64 encoded.\n *\n * Pass Encoding.UTF8 to read data as string\n *\n * @since 1.0.0\n */\n encoding?: Encoding;\n\n /**\n * The offset to start reading the file from, in bytes.\n * Native only (not available in web).\n * Can be used in conjunction with length to partially read files.\n *\n * @since 8.1.0\n * @default 0\n */\n offset?: number;\n\n /**\n * The length of data to read, in bytes.\n * Any non-positive value means to read to the end of the file.\n * Native only (not available in web).\n * Can be used in conjunction with offset to partially read files.\n *\n * @since 8.1.0\n * @default -1\n */\n length?: number;\n}\n\nexport interface ReadFileInChunksOptions extends ReadFileOptions {\n /**\n * Size of the chunks in bytes.\n *\n * @since 7.1.0\n */\n chunkSize: number;\n}\n\nexport interface DeleteFileOptions {\n /**\n * The path of the file to delete\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to delete the file from\n *\n * @since 1.0.0\n */\n directory?: Directory;\n}\n\nexport interface MkdirOptions {\n /**\n * The path of the new directory\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to make the new directory in\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * Whether to create any missing parent directories as well.\n *\n * @default false\n * @since 1.0.0\n */\n recursive?: boolean;\n}\n\nexport interface RmdirOptions {\n /**\n * The path of the directory to remove\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to remove the directory from\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * Whether to recursively remove the contents of the directory\n *\n * @default false\n * @since 1.0.0\n */\n recursive?: boolean;\n}\n\nexport interface ReaddirOptions {\n /**\n * The path of the directory to read\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to list files from\n *\n * @since 1.0.0\n */\n directory?: Directory;\n}\n\nexport interface GetUriOptions {\n /**\n * The path of the file to get the URI for\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to get the file under\n *\n * @since 1.0.0\n */\n directory: Directory;\n}\n\nexport interface StatOptions {\n /**\n * The path of the file to get data about\n *\n * @since 1.0.0\n */\n path: string;\n\n /**\n * The `Directory` to get the file under\n *\n * @since 1.0.0\n */\n directory?: Directory;\n}\n\nexport interface CopyOptions {\n /**\n * The existing file or directory\n *\n * @since 1.0.0\n */\n from: string;\n\n /**\n * The destination file or directory\n *\n * @since 1.0.0\n */\n to: string;\n\n /**\n * The `Directory` containing the existing file or directory\n *\n * @since 1.0.0\n */\n directory?: Directory;\n\n /**\n * The `Directory` containing the destination file or directory. If not supplied will use the 'directory'\n * parameter as the destination\n *\n * @since 1.0.0\n */\n toDirectory?: Directory;\n}\n\nexport type RenameOptions = CopyOptions;\n\nexport interface ReadFileResult {\n /**\n * The representation of the data contained in the file\n *\n * Note: Blob is only available on Web. On native, the data is returned as a string.\n *\n * @since 1.0.0\n */\n data: string | Blob;\n}\n\nexport interface WriteFileResult {\n /**\n * The uri where the file was written into\n *\n * @since 1.0.0\n */\n uri: string;\n}\n\nexport interface ReaddirResult {\n /**\n * List of files and directories inside the directory\n *\n * @since 1.0.0\n */\n files: FileInfo[];\n}\n\nexport interface FileInfo {\n /**\n * Name of the file or directory.\n *\n * @since 7.1.0\n */\n name: string;\n\n /**\n * Type of the file.\n *\n * @since 4.0.0\n */\n type: 'directory' | 'file';\n\n /**\n * Size of the file in bytes.\n *\n * @since 4.0.0\n */\n size: number;\n\n /**\n * Time of creation in milliseconds.\n *\n * It's not available on Android 7 and older devices.\n *\n * @since 7.1.0\n */\n ctime?: number;\n\n /**\n * Time of last modification in milliseconds.\n *\n * @since 7.1.0\n */\n mtime: number;\n\n /**\n * The uri of the file.\n *\n * @since 4.0.0\n */\n uri: string;\n}\n\nexport interface GetUriResult {\n /**\n * The uri of the file\n *\n * @since 1.0.0\n */\n uri: string;\n}\n\nexport type StatResult = FileInfo;\nexport interface CopyResult {\n /**\n * The uri where the file was copied into\n *\n * @since 4.0.0\n */\n uri: string;\n}\n\nexport interface DownloadFileOptions extends HttpOptions {\n /**\n * The path the downloaded file should be moved to.\n *\n * @since 5.1.0\n */\n path: string;\n /**\n * The directory to write the file to.\n * If this option is used, filePath can be a relative path rather than absolute.\n * The default is the `DATA` directory.\n *\n * @since 5.1.0\n */\n directory?: Directory;\n /**\n * An optional listener function to receive downloaded progress events.\n * If this option is used, progress event should be dispatched on every chunk received.\n * Chunks are throttled to every 100ms on Android/iOS to avoid slowdowns.\n *\n * @since 5.1.0\n */\n progress?: boolean;\n /**\n * Whether to create any missing parent directories.\n *\n * @default false\n * @since 5.1.2\n */\n recursive?: boolean;\n}\n\nexport interface DownloadFileResult {\n /**\n * The path the file was downloaded to.\n *\n * @since 5.1.0\n */\n path?: string;\n /**\n * The blob data of the downloaded file.\n * This is only available on web.\n *\n * @since 5.1.0\n */\n blob?: Blob;\n}\n\nexport interface ProgressStatus {\n /**\n * The url of the file being downloaded.\n *\n * @since 5.1.0\n */\n url: string;\n /**\n * The number of bytes downloaded so far.\n *\n * @since 5.1.0\n */\n bytes: number;\n /**\n * The total number of bytes to download for this file.\n *\n * @since 5.1.0\n */\n contentLength: number;\n}\n\n/**\n * Callback for receiving chunks read from a file, or error if something went wrong.\n *\n * @since 7.1.0\n */\nexport type ReadFileInChunksCallback = (chunkRead: ReadFileResult | null, err?: any) => void;\n\n/**\n * A listener function that receives progress events.\n *\n * @since 5.1.0\n */\nexport type ProgressListener = (progress: ProgressStatus) => void;\n\nexport interface FilesystemPlugin {\n /**\n * Check read/write permissions.\n * Required on Android, only when using `Directory.Documents` or\n * `Directory.ExternalStorage`.\n *\n * @since 1.0.0\n */\n checkPermissions(): Promise<PermissionStatus>;\n\n /**\n * Request read/write permissions.\n * Required on Android, only when using `Directory.Documents` or\n * `Directory.ExternalStorage`.\n *\n * @since 1.0.0\n */\n requestPermissions(): Promise<PermissionStatus>;\n\n /**\n * Read a file from disk\n *\n * @since 1.0.0\n */\n readFile(options: ReadFileOptions): Promise<ReadFileResult>;\n\n /**\n * Read a file from disk, in chunks.\n * Native only (not available in web).\n * Use the callback to receive each read chunk.\n * If empty chunk is returned, it means file has been completely read.\n *\n * @since 7.1.0\n */\n readFileInChunks(options: ReadFileInChunksOptions, callback: ReadFileInChunksCallback): Promise<CallbackID>;\n\n /**\n * Write a file to disk in the specified location on device\n *\n * @since 1.0.0\n */\n writeFile(options: WriteFileOptions): Promise<WriteFileResult>;\n\n /**\n * Append to a file on disk in the specified location on device\n *\n * @since 1.0.0\n */\n appendFile(options: AppendFileOptions): Promise<void>;\n\n /**\n * Delete a file from disk\n *\n * @since 1.0.0\n */\n deleteFile(options: DeleteFileOptions): Promise<void>;\n\n /**\n * Create a directory.\n *\n * @since 1.0.0\n */\n mkdir(options: MkdirOptions): Promise<void>;\n\n /**\n * Remove a directory\n *\n * @since 1.0.0\n */\n rmdir(options: RmdirOptions): Promise<void>;\n\n /**\n * Return a list of files from the directory (not recursive)\n *\n * @since 1.0.0\n */\n readdir(options: ReaddirOptions): Promise<ReaddirResult>;\n\n /**\n * Return full File URI for a path and directory\n *\n * @since 1.0.0\n */\n getUri(options: GetUriOptions): Promise<GetUriResult>;\n\n /**\n * Return data about a file\n *\n * @since 1.0.0\n */\n stat(options: StatOptions): Promise<StatResult>;\n\n /**\n * Rename a file or directory\n *\n * @since 1.0.0\n */\n rename(options: RenameOptions): Promise<void>;\n\n /**\n * Copy a file or directory\n *\n * @since 1.0.0\n */\n copy(options: CopyOptions): Promise<CopyResult>;\n\n /**\n * Perform a http request to a server and download the file to the specified destination.\n *\n * This method has been deprecated since version 7.1.0.\n * We recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.\n *\n * @since 5.1.0\n * @deprecated Use the @capacitor/file-transfer plugin instead.\n */\n downloadFile(options: DownloadFileOptions): Promise<DownloadFileResult>;\n\n /**\n * Add a listener to file download progress events.\n *\n * This method has been deprecated since version 7.1.0.\n * We recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.\n *\n * @since 5.1.0\n * @deprecated Use the @capacitor/file-transfer plugin instead.\n */\n addListener(eventName: 'progress', listenerFunc: ProgressListener): Promise<PluginListenerHandle>;\n\n /**\n * Remove all listeners for this plugin.\n *\n * This method has been deprecated since version 7.1.0.\n * We recommend using the @capacitor/file-transfer plugin instead, in conjunction with this plugin.\n *\n * @since 5.2.0\n * @deprecated Use the @capacitor/file-transfer plugin instead.\n */\n removeAllListeners(): Promise<void>;\n}\n\n/**\n * Structure for errors returned by the plugin.\n *\n * `code` follows \"OS-PLUG-FILE-XXXX\" format\n *\n * @since 1.0.0\n */\nexport type PluginError = {\n code: string;\n message: string;\n};\n\n/**\n * @deprecated Use `ReadFileOptions`.\n * @since 1.0.0\n */\nexport type FileReadOptions = ReadFileOptions;\n\n/**\n * @deprecated Use `ReadFileResult`.\n * @since 1.0.0\n */\nexport type FileReadResult = ReadFileResult;\n\n/**\n * @deprecated Use `WriteFileOptions`.\n * @since 1.0.0\n */\nexport type FileWriteOptions = WriteFileOptions;\n\n/**\n * @deprecated Use `WriteFileResult`.\n * @since 1.0.0\n */\nexport type FileWriteResult = WriteFileResult;\n\n/**\n * @deprecated Use `AppendFileOptions`.\n * @since 1.0.0\n */\nexport type FileAppendOptions = AppendFileOptions;\n\n/**\n * @deprecated Use `DeleteFileOptions`.\n * @since 1.0.0\n */\nexport type FileDeleteOptions = DeleteFileOptions;\n\n/**\n * @deprecated Use `Directory`.\n * @since 1.0.0\n */\nexport const FilesystemDirectory = Directory;\n\n/**\n * @deprecated Use `Encoding`.\n * @since 1.0.0\n */\nexport const FilesystemEncoding = Encoding;\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@capacitor/filesystem",
3
- "version": "8.1.1-dev.spm",
3
+ "version": "8.1.2",
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",
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "scripts": {
33
33
  "verify": "npm run verify:ios && npm run verify:android && npm run verify:web",
34
- "verify:ios": "cd ../.. && xcodebuild -scheme CapacitorFilesystem -destination generic/platform=iOS",
34
+ "verify:ios": "xcodebuild -scheme CapacitorFilesystem -destination generic/platform=iOS",
35
35
  "verify:android": "cd android && ./gradlew clean build test && cd ..",
36
36
  "verify:web": "npm run build",
37
37
  "lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
@@ -44,9 +44,7 @@
44
44
  "clean": "rimraf ./dist",
45
45
  "watch": "tsc --watch",
46
46
  "prepublishOnly": "npm run build",
47
- "publish:cocoapod": "pod trunk push ./CapacitorFilesystem.podspec --allow-warnings",
48
- "prepack": "cp ../../Package.swift Package.swift && node -e 'const fs=require(\"fs\");let s=fs.readFileSync(\"Package.swift\",\"utf8\").split(\"packages/capacitor-plugin/\").join(\"\");fs.writeFileSync(\"Package.swift\",s);'",
49
- "postpack": "rm -f Package.swift"
47
+ "publish:cocoapod": "pod trunk push ./CapacitorFilesystem.podspec --allow-warnings"
50
48
  },
51
49
  "dependencies": {
52
50
  "@capacitor/synapse": "^1.0.4"