Recent

Author Topic: How find Total Space  (Read 529 times)

dimonershov

  • Newbie
  • Posts: 5
How find Total Space
« on: March 05, 2023, 11:46:12 am »
Hi

How to find out the size of the internal memory in bytes? :-[
I programming app on Android in LAMV.

In Windows i write:
Windows.GetDiskFreeSpaceEx(Pchar(usb_name_37+':\'),FreeBytesAvailableToCaller,Totalsize,@FreeSize);
« Last Edit: March 05, 2023, 11:53:22 am by dimonershov »

higgins

  • Newbie
  • Posts: 6
Re: How find Total Space
« Reply #1 on: March 08, 2023, 03:17:18 pm »
Hi,

This thread may help you. It concerns Delphi but includes several links
https://stackoverflow.com/questions/50552808/delphi-tokyo-android-how-do-i-get-the-free-available-disk-space

Thaddy

  • Hero Member
  • *****
  • Posts: 14373
  • Sensorship about opinions does not belong here.
Re: How find Total Space
« Reply #2 on: March 08, 2023, 03:56:56 pm »
The most reliable way is to call GetHeapStatus, which is always available.
https://www.freepascal.org/docs-html/rtl/system/getheapstatus.html
Object Pascal programmers should get rid of their "component fetish" especially with the non-visuals.

 

TinyPortal © 2005-2018