Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes

Change language to:
Français - 日本語 - Português - Русский
Scilab Help >> Advanced functions > Libraries > libraryinfo


gets the path and the set of primary functions of a loaded library


macros = libraryinfo(libraryname)
[macros, libpath] = libraryinfo(libraryname)



string: name of the loaded library.


column of strings: names of main functions belonging to the library.


string: path to the lib file of the library.


gets the names of the functions (written in Scilab language) belonging to the given library, and the path of the directory where their *.sci files and the lib file are stored. Subsidiary functions that may follow the main ones in .sci files are private and are not returned.

Only loaded libraries can be addressed by libraryinfo().

Getting some library info from its handle

libraryinfo() works from the literal name of the library. In some cases, we may have only its handle, defined when loading the library. For instance, libraryinfo("iolib") works, libraryinfo(iolib) does not. How to use the handle to get any info? Let's go on with the iolib example:

  • Getting the path: libpath = string(iolib)(1)
  • Getting the column vector of members functions: functions = string(iolib)(2:$)
  • Getting the literal name of the library: libraryname = xmlGetValues("//scilablib", "name", libpath)

Unloaded library: getting info through its path

If the considered library is not loaded, neither libraryinfo() nor string() can work.

Provided that we know its libpath, we then can

  • get its literal name: xmlGetValues("//scilablib", "name", libpath+"/lib")
  • get the column vector of members functions: functions = xmlGetValues("//scilablib/macro", "name", libpath+"/lib")


With libraryinfo(), from the literal library name:

[f, p] = libraryinfo("iolib")
--> [f, p] = libraryinfo("iolib")
 p  =

 f  =
!input      !
!unix_g     !
!unix_w     !
!%_sodload  !
!unix_x     !
!unix_s     !

From the library handle:

// Just for display:

// Catch info into variables:
p = string(iolib)(1)
f = string(iolib)(2:$)
libname = xmlGetValues("//scilablib", "name", p+"/lib")
--> // Just for display:
--> iolib

 iolib  =
Functions files location : SCI\modules\io\macros\.
input  unix_g  unix_w  %_sodload  unix_x  unix_s

--> // Catch info into variables:
--> p = string(iolib)(1)
 p  =

--> f = string(iolib)(2:$)
 f  =
!input      !
!unix_g     !
!unix_w     !
!%_sodload  !
!unix_x     !
!unix_s     !

--> libname = xmlGetValues("//scilablib", "name", p+"/lib")
 libname  =

For a not-loaded library, from its path:

path = fullpath("SCI/modules/scicos_blocks/macros/Hydraulics");
libname = xmlGetValues("//scilablib", "name", path+"/lib")
functions = xmlGetValues("//scilablib/macro", "name", path+"/lib")
Hydraulicslib  // not-loaded (Xcos must have not been run)
--> libname = xmlGetValues("//scilablib", "name", path+"/lib")
 libname  =

--> functions = xmlGetValues("//scilablib/macro", "name", path+"/lib")
 functions  =
!Bache          !
!Flowmeter      !
!PerteDP        !
!PuitsP         !
!SourceP        !
!VanneReglante  !

--> Hydraulicslib
Undefined variable: Hydraulicslib

See also

  • string — conversion to string
  • load — Loads some archived variables, a saved graphic figure, a library of functions
  • librarieslist — gets the list of loaded Scilab libraries
  • whereis — Returns the name of the loaded library/module a given function belongs to
Report an issue
<< librarieslist Libraries argn >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Jan 03 14:23:44 CET 2022