English Amiga Board


Go Back   English Amiga Board > Coders > Coders. System

 
 
Thread Tools
Old 01 March 2016, 10:01   #1
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Question Get type of DOS object?

Hi,

I would like to know the type of what a path points to. Possible types are:

ram:
volume:
assign:
/directory

I have the path as above and I am interested in the type. For example get the value 1 if object is a ram disk, get a 2 if it is a volume and so on.

greets,
ags
AGS is offline  
Old 01 March 2016, 12:18   #2
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
I now try something with FindDosEntry(). Just the "ram:" type is not covered by that. What else to identify "ram:" can I do than comparing the name with strings, e.g. "Ram:", "Ram Disk:" or so?
AGS is offline  
Old 01 March 2016, 14:44   #3
Daedalus
Registered User
 
Daedalus's Avatar
 
Join Date: Jun 2009
Location: Dublin, then Glasgow
Posts: 6,334
The Ram Disk is always mounted as RAM:, so simply checking for that should be enough surely? Part of the whole Amiga way of thinking is that all drives and volumes are treated equally, so that files can be handled by any device transparently to the software.

I'm sure there's a way of finding out the handler that controls a particular volume, perhaps if you're scanning all volumes you can look for ram-handler or something like that? I vaguely remember something like that being possible but can't remember the struct it's in.
Daedalus is offline  
Old 02 March 2016, 11:20   #4
hooverphonique
ex. demoscener "Bigmama"
 
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
Quote:
Originally Posted by AGS View Post
I now try something with FindDosEntry(). Just the "ram:" type is not covered by that. What else to identify "ram:" can I do than comparing the name with strings, e.g. "Ram:", "Ram Disk:" or so?
there's no fool-proof way to identify ram-based filesystems (because they're nothing special compared to others) , so you will need to e.g. match the handler/task name, as suggested, against a list of known ram handlers.
hooverphonique is offline  
Old 02 March 2016, 13:35   #5
idrougge
Registered User
 
Join Date: Sep 2007
Location: Stockholm
Posts: 4,332
I'd just test if the destination is 100% full. It's not what the original poster wanted, but I think it fits the purposes intended.
idrougge is offline  
Old 02 March 2016, 14:22   #6
AGS
XoXo/Tasko Developer
 
AGS's Avatar
 
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
Thanks for the ideas. Purpose is a filerequester/filemanager, where the free bytes (or K, M, G) should be shown after the volume names.
AGS is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
DOS Error 202: Object is in use. eva support.Apps 1 02 August 2015 17:53
PCMCIA fault: DOS error code 225 - Not a valid DOS disk 4am support.Hardware 2 07 April 2012 10:20
UAE Dos Error #205 (object not found)..... (?) DC33 support.Games 8 09 June 2008 09:05
"DOS-Error #205 (object not found) on reading "devs:kickstarts/kick 40068.a4000" Brutal_dentist New to Emulation or Amiga scene 10 03 April 2005 23:12
"DOS-Error #205 (object not found) on reading "devs:kickstarts/kick 40068.a4000" Unregistered New to Emulation or Amiga scene 1 22 December 2004 09:48

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 08:11.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.22460 seconds with 15 queries