Driver

Sample

 "measures":{
    "drive":{
      "name":"drive1",
      "title":"Drive",
     },
   }

download excample widget from here : https://www.deviantart.com/rainysoft/art/Drives-Line-762679228

Information

  • Measure Type: drive

  • Description: "drive" measure used to display all drives on your computer ,include USB drive when USB inserted

Propertys

isAllDrive

Whether to automatically detect all drives. users can change it by settings. default value is "true".

drives

if "isAllDrive" is false, drive measure will only detect the drives that include "drives", for example this code will only detect the drives of "C,E,H"

 "drive":{
      "name" : "drive1",
      "title" : "Drive",
      "isAllDrive" : "false",
      "drives" : "C,E,H"
     },

items

all the drives that detected are in items,every item include these data tags:

volume  //the drive item volume name
label   //the drive item label name
driveType  //0=unknown,2=Removeable(USB),3=fixed(HDD),4-remote,5=CDROM,6=RAM Disk
total   //the drive item totole size with auto scale unit,e.g.  8.2G , 1.9T
used    //the drive item used size with auto scale unit,e.g.  8.2G , 1.9T
free    //the drive item free size with auto scale unit,e.g.  8.2G , 1.9T

totalM  //the drive item total MB size without unit,e.g.  8.2 , 1900
usedM   //the drive item used MB size without unit,e.g.  8.2 , 1900
freeM   //the drive item freeM MB size without unit,e.g.  8.2 , 1900

totalG  //the drive item total GB size without unit,e.g.  8.2 , 1900
usedG   //the drive item used GB size without unit,e.g.  8.2 , 1900
freeG   //the drive item freeM GB size without unit,e.g.  8.2 , 1900

percent    //the drive item used size percent,e.g.  82 , 19
freePercent    //the drive item free size percent,e.g.  18 , 81

tenth   //the drive item used size tenth (0~10),e.g.  8 , 2
freeTenth   //the drive item free size tenth (0~10),e.g.  2 , 8

open   //Used to bind the onclick event to open this drive
eject  //Used to bind the onclick event to eject this drive(only for USB and CDROM)

e.g. List all the drives volume on your computer: <li v-for="item in drive1.items"> {{ item.volume }} </li>

e.g. Click to open the drive item with item.open : <li v-for="item in drive1.items" v-bind:onclick="item.open" > {{ item.volume }} </li>

e.g. Click to eject the drive item with item.eject if the drive is USB or CDROM: <li v-for="item in drive1.items" v-bind:onclick="item.eject" > {{ item.volume }} </li>

Other data tags

allTotal  //all drives that detected total size with auto scale unit,e.g. 1.9T,820G
allUsed   //all drives that detected used size with auto scale unit,e.g. 1.9T,820G
allFree   //all drives that detected free size with auto scale unit,e.g. 1.9T,820G

allTotalM //all drives that detected total MB size without unit,e.g. 1900,82
allUsedM  //all drives that detected used MB size without unit,e.g. 1900,82
allFreeM  //all drives that detected free MB size without unit,e.g. 1900,82

allTotalG //all drives that detected total GB size without unit,e.g. 1900,82 
allUsedG  //all drives that detected used GB size without unit,e.g. 1900,82
allFreeG  //all drives that detected free GB size without unit,e.g. 1900,82

allTotalT //all drives that detected total TB size without unit,e.g. 1900,82 
allUsedT  //all drives that detected used TB size without unit,e.g. 1900,82
allFreeT  //all drives that detected free TB size without unit,e.g. 1900,82

allPercent    //all drives that detected used size percent,e.g.  82 , 19
allFreePercent //all drives that detected free size percent,e.g.  18 , 81
allTenth   //all the drives used size tenth (0~10),e.g.  8 , 2
allFreeTenth  //all the drives free size tenth (0~10),e.g.  2 , 8

e.g. display the total space size of all the disk drives on your computer <div id="widget">{{ drive1.allTotal }} </div>

Last updated