Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: motorollin on August 29, 2006, 07:27:29 AM

Title: Blitz Basic: Retrieving volume info?
Post by: motorollin on August 29, 2006, 07:27:29 AM
Hi all

I'm trying to find a way of retrieving a list of currently mounted volumes, and also finding out the amount of data in bytes on a volume. Can anyone give me a hint to the correct Blitz2 functions?

Thanks

--
moto
Title: Re: Blitz Basic: Retrieving volume info?
Post by: adolescent on August 29, 2006, 08:31:09 AM
Check out DosElmoreLib22.lha (http://it.aminet.net/dev/basic/DosElmoreLib22.lha) on Aminet.
Title: Re: Blitz Basic: Retrieving volume info?
Post by: motorollin on August 29, 2006, 09:46:25 AM
GetAssigns(2) and DiskUsed look like exactly what I need. Thanks! I'm not too familiar with Blitz (yet) so can I just run my code by you first? Normally I would just try it but I don't want to experiment with routines which do things to disks :-)


If GetAssigns(2)
-Repeat
--a$=Assign$
--If a$
---Analyze a$
---used$=DiskUsed
---NPrint a$ used$
--EndIf
-Until a$=""
EndIf


--
moto

--EDIT
Added some white "-"s because HTML rendered out the indenting spaces :roll:
Title: Re: Blitz Basic: Retrieving volume info?
Post by: motorollin on August 29, 2006, 07:53:58 PM
This may be a stupid question, but how do I include the .obj file in my Blitz application so I can call its functions?

--
moto
Title: Re: Blitz Basic: Retrieving volume info?
Post by: motorollin on August 29, 2006, 08:29:58 PM
Ok I found BlitzLibMan on Aminet which recompiled the deflibs including the new .obj I downloaded. The programme now runs, but it returns incorrect values for DiskUsed. Two of the three volumes reported negative values and the other reported a value which was far to small. Any thoughts?

--
moto
Title: Re: Blitz Basic: Retrieving volume info?
Post by: adolescent on August 30, 2006, 08:48:49 PM
Are they >4GB?  Maybe it has a problem with large volumes?
Title: Re: Blitz Basic: Retrieving volume info?
Post by: motorollin on August 30, 2006, 08:50:22 PM
Yes the one which returns incorrect values is >4GB. Piru has suggested in another thread that I call dos.library's info() function directly. No idea how tho :roll:

--
moto