PC SOFT

WINDEVWEBDEV AND WINDEV MOBILE
ONLINE HELP

Home | Sign in | English UK
  • Type of disk
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Returns information about a disk.
// Total disk size?
ResDiskSize is numeric = fDriveInfo("C:", fdTotalSpace)
WINDEVUser code (UMC)
// Name of volume
ResultName is string
ResultName = fDriveInfo("C:", fdVolumeName)
Info(ResultName)
Syntax
<Result> = fDriveInfo(<Disk path> , <Information>)
<Result>: All types
  • Requested information.
  • 0 if an error occurred. To get the details of the error, use ErrorInfo with the errMessage constant.
<Disk path>: Character string (with quotes)
Path of disk to use in the following format:
  • <drive letter>:. For example: "A:". The drive letter is written in uppercase character.
  • UNC path. For example: "\\<ServerName>\<ShareName>".
<Information>: Constant
Specifies the requested type of information:
fdFreeSpaceAvailable disk space (in bytes)
fdTotalSpaceTotal size of the disk (in bytes)
fdNbClusterNumber of disk clusters
fdNbSectorPerClusterNumber of sectors per cluster
fdVolumeNameName of volume
fdSerialNumberSerial number of the disk, defined when the disk is formatted (differs from the serial number given by the manufacturer).
fdFileNameSizeMaximum size of file name on the disk (in characters)
fdSectorSizeSize of sector (in bytes)
fdDriveTypeType of disk (see the table below)
Remarks
WINDEVUser code (UMC)

Type of disk

The types of disks are WLanguage constants. The possible values are:
ConstantValueType of disk
fdUnknown32Unknown type
fdRemovable1Removable disk (diskette, zip, etc.)
fdFixed2Fixed disk (hard disk)
fdInvalid0The specified path does not correspond to a disk
fdRemote4Network disk
fdCDRom8CD-ROM (and burners, DVD, etc.)
fdRAM16Virtual disk
Component : wd250std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Example Pie
EDT_HD_Total = Val(fDriveInfo("C:", fdTotalSpace))/1000
EDT_HD_Livre = Val(fDriveInfo("C:", fdFreeSpace))/1000
EDT_HD_Usado = Val(Val(EDT_HD_Total) - Val(EDT_HD_Livre))

grTitle(CHART_HD, "Info HD C:")

IF grExist(CHART_HD) THEN
grDeleteSeries(CHART_HD)
grDeleteAll(CHART_HD)
grClearPict(CHART_HD)
END

// Display the values
grLabel(CHART_HD, grShowValue, True)

//Legendas
grSeriesLabel(CHART_HD,1,"Usado")
grSeriesLabel(CHART_HD,2,"Livre")
grCategoryLabel(CHART_HD,1,"Usado")
grCategoryLabel(CHART_HD,2,"Livre")

//Legenda no Roda pé
grLegend(CHART_HD,grAtBottom)

//Exibe porcentagem
grLabel(CHART_HD, grShowPercent, True)

//Cores
//Usado é Vermelho
grSeriesColor(CHART_HD, 1, GetColor(1,RGB(255,0,0)))
//Livre é Azul
grSeriesColor(CHART_HD, 2, GetColor(2,RGB(0,0,255)))

//Valor do HD Usado
grAddData(CHART_HD,1,Val(EDT_HD_Usado))
//Valor do HD Livre
grAddData(CHART_HD,1,Val(EDT_HD_Livre))
grDraw(CHART_HD)
Boller
26 Sep. 2020
Video fDriveInfo
https://youtu.be/cYm2QdQatpo
https://windevdesenvolvimento.blogspot.com/2019/09/dicas-2270-windev-webdev-mobile.html

//btn_espaco_hd
TableDeleteAll(TABLE_HD)
LIVRE_C is int=LengthToString(fDriveInfo("C:",fdFreeSpace),sizeGB)
TOTAL_C is int=LengthToString(fDriveInfo("C:",fdTotalSpace),sizeGB)
nOCUPADO is int=TOTAL_C-LIVRE_C
EDT_TOTAL_HD=TOTAL_C

TableAddLine(TABLE_HD,"C: Livre ",LIVRE_C)
TableAddLine(TABLE_HD,"C: Ocupado",nOCUPADO)
grDraw(CHART_HD)
amarildo
03 Sep. 2019