New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

electron-macos-file-provider

Package Overview
Dependencies
Maintainers
0
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

electron-macos-file-provider

Apple FileProvider for macos using the N-API extension electron

  • 1.0.12
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-87.5%
Maintainers
0
Weekly downloads
 
Created
Source

Electron Expand Apple FileProvider for MacOS

trying to implement Apple FileProvider for macos using the N-API extension electron.

Install Guide

  1. installation dependency
npm install electron-macos-file-provider
  1. copy the PlugIns/EleFileProvider.appex you have configured and compiled in your Electron application construction process. reference Developer document part configuration and compile EleFileProvider.appex

APIs

NSFileProviderManager addDomain

addDomain("cloud.lazycat.client", "", 
    {
        url: "http://localhost:8080/webdav/",
        user: "user001",
        password: "mypassword",
    },
    (err: any) => {
    if(err) {
        console.log("[EleFileProvider] addDomain failed", err);
        return;
    }
    console.log("[EleFileProvider] addDomain success!");
})

NSFileProviderManager removeAllDomains

removeAllDomains((err: any) => {
    if(err) {
        console.log("[EleFileProvider] removeAllDomains failed", err);
        return;
    }
    console.log("[EleFileProvider] removeAllDomains success!");
})

NSFileProviderManager getUserVisibleURLForItemIdentifier

getUserVisiblePath("cloud.lazycat.client", "")
    .then(path => {
        // path = /Users/Apollo/Library/CloudStorage/MyAppClient
        console.log("[EleFileProvider] getUserVisiblePath:", path)
    })
    .catch(error => {
        console.error("[EleFileProvider] getUserVisiblePath failed", error)
    })

Developer

Please use xcode to open EFPHelper.xcodeproj and configure your development team and App Identifier and the correct app groups identifier.

If you need to modify FileProvider Expand, you can try to run the EFPHelper application for debugging.

  1. execute npm install installation dependency

  2. configure node-gyp npm run dev:init

  3. build node native modules npm run dev:build

  4. build EleFileProvider PlugIns npm run dev:plugin

Supports

  • WebDAV Storage

References

https://developer.apple.com/documentation/fileprovider/synchronizing-files-using-file-provider-extensions

https://nodejs.org/api/n-api.html#node-api

https://github.com/nodejs/node-addon-examples

Contributing

This project exists thanks to all the people who contribute.

We welcome contributions of any kind, please see our contributing guide. Found a bug? Please submit an issue.

License

This Project is MIT licensed.

Keywords

FAQs

Package last updated on 24 Oct 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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