LibraryTools - Maple Programming Help

Home : Support : Online Help : System : Libraries and Packages : LibraryTools : LibraryTools/WriteMode

LibraryTools

 WriteMode
 display or modify read-write mode of a library

 Calling Sequence WriteMode( archive, mode )

Parameters

 archive - string; Maple library or directory containing Maple libraries mode - (optional) "READONLY" or "WRITABLE"; read-write mode of the library

Description

 • The WriteMode( archive, mode) calling sequence displays or modifies read-write mode of a library specified in archive. For more details on library read-write mode, see march.
 • If archive is a directory, the read-write modes of all the libraries in that directory are displayed. Otherwise, if archive is a file that is a Maple library (has the extension .lib or .mla), only the read-write mode of that library is displayed. An error is raised if the path specified by archive does not exist.
 • The optional mode specifies the new read-write mode to be assigned to the library and the new mode is displayed. When mode is not given, the read-write mode of the library is displayed but remains unchanged.

Examples

 > $\mathrm{with}\left(\mathrm{LibraryTools}\right):$
 > $\mathrm{LibLocation}≔\mathrm{cat}\left(\mathrm{kernelopts}\left(\mathrm{mapledir}\right),"/lib/myLib.mla"\right)$
 > $\mathrm{Create}\left(\mathrm{LibLocation}\right)$
 > $\mathrm{WriteMode}\left(\mathrm{LibLocation}\right)$
 > $\mathrm{WriteMode}\left(\mathrm{LibLocation},"READONLY"\right)$