Is it possible to know, if a volume exists without having to live with the popup requester from DOS asking for the volume to be inserted?
As far as I can see, ExamineObjectTags do not come with a feature to suppress DOS requesters.
Is it possible to know, if a volume exists without having to live with the popup requester from DOS asking for the volume to be inserted?
As far as I can see, ExamineObjectTags do not come with a feature to suppress DOS requesters.
@alfkil
AmigaOne X5000-020 / 2GB RAM / Sapphire Pulse Radeon RX 560 / AmigaOS 4.1 Final Edition Update 2
If you need a file system and not a handler then trying for a SHARED_LOCK with Lock() might be more appropriate than using ExamineObjectTags() if you don't need the ExamineData structure.
Also if the name really must be a volume and not an assign or device or something else you can search the doslist manually using LockDosList()/FindDosEntry()/UnlockDosList(). This is a bit low level but you won't have to disable error requesters then.
Thanks!
And how one could do it *without* C code?
As an example, when using a Python script and os.system()
Maybe we would need some CLI command to enable/disable this option.
--
Elwood
You can use something like INFO command (or the function/code in the language used):
#info kdh1:
Discos montados:
Unidad Tamaño Usados Libres Lleno Errs. Estado Nombre Tipo DOS
KDH1: 26G 9.838M 16G 36% 0 Lect./Escr. Utilidades NGF\00
Volúmenes disponibles:
Utilidades: [Montado]
#info kdh11:
kdh11: objeto no encontrado
#
AOS4.1/SAM460ex/PPC460EX-1155MHZ/2048MB/RadeonHD6570/SSD120GB/DVDRW :-P
@elwood
You can make your own CLI command (script). Here is an example:
; AmigaDOS script
.key myvolume
.bra {
.ket }
IF {myvolume} NOT GT " "
ECHO "Error: No argument entered."
SKIP error
ENDIF
assign {myvolume} exists noreq >NIL:
if WARN
echo "Does not exist."
else
echo "Does exist."
endif
QUIT
LAB error
QUIT 5
X1000 - OS 4.1FE