Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/takamin/gdrive-fs
The integrated user inteface of Google Drive File System on HTML5
https://github.com/takamin/gdrive-fs
filesystem google-drive npm webapp
Last synced: 2 months ago
JSON representation
The integrated user inteface of Google Drive File System on HTML5
- Host: GitHub
- URL: https://github.com/takamin/gdrive-fs
- Owner: takamin
- License: mit
- Created: 2018-06-07T11:19:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-18T20:19:27.000Z (over 1 year ago)
- Last Synced: 2024-09-10T13:53:32.160Z (3 months ago)
- Topics: filesystem, google-drive, npm, webapp
- Language: JavaScript
- Homepage: https://takamints.hatenablog.jp/entry/google-drive-file-system-for-web-app
- Size: 3.9 MB
- Stars: 8
- Watchers: 3
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
gdrive-fs
=========[![Build Status](https://travis-ci.org/takamin/gdrive-fs.svg?branch=master)](https://travis-ci.org/takamin/gdrive-fs)
Google Drive API client for Web Application.
__CAUTION:__
After v2.0.0, The API loadApi is changed. It needs clientSecret at its second
parameter instead of apiKey.
It is needed to clear the cookies of the web pages running by command `npm start` or
`npm run web-test`. On the pages, the API key has been saved to cookies to connect
Google drive APIs.A brief explanation is described in a documet for the class
[Gdfs](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs.html).APIs
----* Class [Gdfs](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs.html) as a client of the Google Drive file system.
* Class methods
* async [`loadApi(clientId, clientSecret)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#.loadApi) loads Google Drive APIs(v3) and initializes its client.
* [`isSignedIn()`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#.isSignedIn) tests the client is signed-in to the Google Drive.
* async [`signIn()`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#.signIn) signs-in with a Google Account.
* async [`signOut()`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#.signOut) signs-out.
* Instance methods
* async [`chdir(directory)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#chdir) changes the current working directory.
* [`cwd()`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#cwd) - returns the current working directory.
* async [`isDirectory(path)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#isDirectory) tests the path is a directory.
* async [`mkdir(path)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#mkdir) creates a folder.
* async [`readdir(path, options)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#readdir) lists file names.
* async [`readFile(path)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#readFile) read the file contents.
* async [`rmdir(path)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#rmdir) removes the directory.
* async [`stat(path)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#stat) returns properties of Google Drive files.
* async [`unlink(path)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#unlink) removes the file (without moving to the trash-box).
* async [`writeFile(path, mimeType, data)`](https://takamin.github.io/gdrive-fs/jsdoc/Gdfs#writeFile) writes data to the file.
* Class [Gdfs.Path](https://takamin.github.io/gdrive-fs/jsdoc/GdfsPath.html) - as representation of path for the Google Drive files.
* Class [Gdfs.Ui](https://takamin.github.io/gdrive-fs/jsdoc/GdfsUi.html)(alpha) - A class supporting to create UI.INSTALL
-------To install, use npm for your project.
```bash
$ npm install --save gdrive-fs
```USING WITH BUNDLER
------------------If you are using some bundler, you can just import this module and use.
```javascript
const Gdfs = require("gdrive-fs");
Gdfs.loadApi(
.
.
.
```USING WITHOUT BUNDLER
--------------------If you do not use any bundler, the following built files are available to include by SCRIPT tag.
* `node_module/gdrive-fs/build/grive-fs.min.js`
* `node_module/gdrive-fs/build/grive-fs.js````xml
...
```
BUILD DISTRIBUTIONS
------------------```bash
$ npm run release
```LICENSE
-------This module published under [MIT LICENSE](LICENSE.md).