Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cordova-plugin-saf-mediastore

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cordova-plugin-saf-mediastore - npm Package Compare versions

Comparing version 1.0.2 to 1.0.3

2

package.json
{
"name":"cordova-plugin-saf-mediastore",
"version":"1.0.2",
"version":"1.0.3",
"description":"Cordova Plugin to read and save files using the Storage Access Framework and Mediastore on Android only.",

@@ -5,0 +5,0 @@ "main":"index.js",

@@ -45,2 +45,10 @@ # cordova-plugin-saf-mediastore

```typescript
overwriteFile(params:{
uri:string,
data:string
}):Promise<string>
```
Overwrites a file at a specific content URI. Returns the content URI.
```typescript
saveFile(params:{

@@ -54,5 +62,25 @@ data:string,

```typescript
deleteFile(uri:string):Promise<number>
```
Deletes a file at a specific content URI. Returns the number of files deleted.
```typescript
getFileName(uri:string):Promise<string>
```
Returns the filename of the corresponding content URI.
```typescript
getUri(params:{
folder:string,
subfolder?:string,
filename?:string,
}):Promise<string>
```
Returns the content URI of the file in the corresponding folder and subfolder.
To call methods:
```
```typescript
cordova.plugins.safMediastore.<function>(params); //returns a Promise
await cordova.plugins.safMediastore.<function>(params); //in an async function
await cordova.plugins.safMediastore.<function>(params); //in an async function
```

@@ -13,2 +13,6 @@ interface SafMediastore{

}):Promise<string>,
overwriteFile(params:{
uri:string,
data:string
}):Promise<string>,
saveFile(params:{

@@ -18,2 +22,9 @@ data:string,

folder?:string
}):Promise<string>,
deleteFile(uri:string):Promise<number>,
getFileName(uri:string):Promise<string>,
getUri(params:{
folder:string,
subfolder?:string,
filename?:string,
}):Promise<string>

@@ -20,0 +31,0 @@ }

@@ -28,3 +28,7 @@ /*global cordova, module*/

'writeFile',
'saveFile'
'overwriteFile',
'saveFile',
'deleteFile',
'getFileName',
'getUri'
].forEach(action=>exports[action]=callPromise(action));

@@ -31,0 +35,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc