Skip to content

jhermsmeier/node-disk-dropbox

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dropbox File System

npm

Install via npm

$ npm install disk-dropbox

Usage Example

var Dropbox = require( 'disk-dropbox' )

// Create a volume with your credentials
var volume = new Dropbox.Volume({
  key: 'xxxxxxxxxxxxxxx',
  secret: 'xxxxxxxxxxxxxxx',
  token: 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
  uid: '00000000'
})

// Initialize the volume
volume.init( function( error ) {
  if( error ) { handleError( error ) }
  // You're authenticated now, and `volume.fs`
  // has node fs module compatible API (see 'disk-fs' module)
  volume.fs.readdir( '/', function( error, entries ) {
    console.log( 'readdir', entries )
  })
})