Amiga.org
Amiga computer related discussion => Amiga Software Issues and Discussion => Topic started by: nyteschayde on January 08, 2012, 08:24:56 PM
-
I would like to replicate the functionality of the CLI command assign from within an application. Does anybody know how to do this? I can't seem to find decent information about it anywhere. Is there an OS call or perhaps a dos.library call or something that would accomplish what I am trying to do?
I'd like to refrain from having to run the assign command as a process from within my app.
-
You should try to avoid making assigns.
But if you cannot avoid it then the ez way is:
Execute("Assign Blah: Someplace:Whereever/",0,0)
-
I would like to replicate the functionality of the CLI command assign from within an application. Does anybody know how to do this?
The dos.library has four related functions:
- AssignAdd()
- AssignLate()
- AssignLock()
- AssignPath()
Take a look into autodocs for details.
-
The dos.library has four related functions:
- AssignAdd()
- AssignLate()
- AssignLock()
- AssignPath()
Take a look into autodocs for details.
Awesome! You rule! Thanks
-
I've just spent the last four hours trying to drum up information on these functions in relation to the dos.library and came up with nothing. Nothing in the dev CD version of the RKRMs. Nothing in my Abacus reference books. Nothing in the SAS/C dev docs. Nothing in the Addison Wesley RKRM print version I own.
If these functions exist, can you show me the reference you're using? Maybe take a snapshot with your smart phone or point me at a web page or anything? Perhaps a code snippet...
The dos.library has four related functions:
- AssignAdd()
- AssignLate()
- AssignLock()
- AssignPath()
Take a look into autodocs for details.
-
Check the Autodocs: http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node0138.html
The RKRM is a programmers reference for general AOS coding, while the Autodocs describe the functions in the standard libraries (and more).
-
I've finally found the information in the AROS dev documents. See here:
http://aros.sourceforge.net/documentation/developers/autodocs/dos.php#assignpath (http://aros.sourceforge.net/documentation/developers/autodocs/dos.php#assignpath)
-
Thanks. Good to know where it exists on the ADCD. God, I wish I had a decent grep executable on my miggy. Would help a lot. That and faster disk access. :)
Check the Autodocs: http://amigadev.elowar.com/read/ADCD_2.1/Includes_and_Autodocs_3._guide/node0138.html
The RKRM is a programmers reference for general AOS coding, while the Autodocs describe the system calls of the standard libraries.
-
Good to know where it exists on the ADCD.
If you have your Amiga and peecee (or another Amiga :)) set up side by side, you may want to view the docs on the peecee side (the link I provided is from elowar's AOS coding doc site which has a nice search function). I have it set up that way, and it's quite comfortable to use, because you don't have to do everything on the same monitor.
-
So far so good. I now have a one line command that performs all the system assigns to a path you define:
i.e. SysDisk DH0:OS/3.9 will perform the equivalent of
Assign Sys: DH0:OS/3.9 Path
Assign S: Sys:S Defer
Assign L: Sys:L Defer
Assign C: Sys:C Defer
Assign Devs: Sys:Devs Defer
Assign Libs: Sys:Libs Defer
Assign Fonts: Sys:Fonts Defer
Optionally it will also do things like HELP, LOCALE, and add CLASSES to Libs:, etc... if you supply the WB or WORKBENCH parameter to the command.
I have a little bit more debugging and source cleanup to perform and then I'll post it on aminet. If anybody has an interest or feature request please let me know.