Wondering what’s next for npm?Check out our public roadmap! »

    dropboxify

    2.0.6 • Public • Published

    Dropboxify License NPM version Dependency Status Build Status Coverage Status

    Read directory content from dropbox compatible way with readify.

    Install

    npm i dropboxify
    

    API

    dropboxify(token, dir[, options])

    • token - string generated access token
    • options - object can contain:
      • sort - sort by: name, size, date
      • order - "asc" or "desc" for ascending and descending order (default: "asc")
      • type - when "raw" returns not formatted result

    Examples

    const sort = 'size';
    const order = 'desc';
    const token = 'token';
    const dir = '/';
    const type = 'raw';
     
    const files = await dropboxify(token, dir, {type, sort, order});
    console.log(files);
    // outputs
    {
        path: "/",
        files: [{
            name: 'dropboxify.js',
            size: 4735,
            date: 1377248899000,
            owner: 0,
            mode: 0
        }, {
            name: 'readify.js',
            size: 3735,
            date: 1377248899000,
            owner: 0,
            mode: 0
        }];
    }

    Related

    • Sortify - sort directory content by name, size, date
    • Readify - read directory content with file attributes: size, date, owner, mode

    License

    MIT

    Install

    npm i dropboxify

    DownloadsWeekly Downloads

    267

    Version

    2.0.6

    License

    MIT

    Unpacked Size

    8.52 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar