01 March 2016, 10:01 | #1 |
XoXo/Tasko Developer
Join Date: Dec 2013
Location: Munich
Age: 48
Posts: 450
|
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 |
01 March 2016, 12:18 | #2 |
XoXo/Tasko Developer
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?
|
01 March 2016, 14:44 | #3 |
Registered User
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. |
02 March 2016, 11:20 | #4 |
ex. demoscener "Bigmama"
Join Date: Jun 2012
Location: Fyn / Denmark
Posts: 1,624
|
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.
|
02 March 2016, 13:35 | #5 |
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.
|
02 March 2016, 14:22 | #6 |
XoXo/Tasko Developer
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.
|
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 |
|
|