Skip to content

rahulgit/phonegap-plugin-dirsize

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

phonegap-plugin-dirsize

This PhoneGap plugin allows you to get SDCard directory size.

only support android platfrom

Installation

Automatically (CLI / Plugman)

dirsize is compatible with Cordova Plugman, compatible with PhoneGap 3.0 CLI, here's how it works with the CLI:

$ phonegap local plugin add https://github.com/weelion/phonegap-plugin-dirsize.git

or

$ cordova plugin add https://github.com/weelion/phonegap-plugin-dirsize.git

run this command afterwards (backup your project first!):

$ cordova prepare

dirsize.js is brought in automatically. There is no need to change or add anything in your html.

Usage

js

var path = 'imgcache';
window.dirsize.size(path, function(size) {
    console.log(size); // output 1048576
});

window.dirsize.formatSize(path, function(size) {
    console.log(size); // output 1MB
});

Have a nice day!

About

This PhoneGap plugin allows you to get directory size.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 83.1%
  • JavaScript 16.9%