Difference between revisions of "Ns library"

From AOLserver Wiki
Jump to navigation Jump to search
(imported from WiKit id 593)
 
 
(One intermediate revision by one other user not shown)
Line 23: Line 23:
 
     /home/aolserver/modules/tcl
 
     /home/aolserver/modules/tcl
  
     % file join [[ns_info home]] modules tcl
+
     % file join [ns_info home] modules tcl
 
     /home/aolserver/modules/tcl
 
     /home/aolserver/modules/tcl
  
Line 29: Line 29:
 
     /home/aolserver/servers/exampleServer/tcl/exampleModule
 
     /home/aolserver/servers/exampleServer/tcl/exampleModule
  
     % file join [[ns_info tcllib]] exampleModule
+
     % file join [ns_info tcllib] exampleModule
 
     /home/aolserver/servers/exampleServer/tcl/exampleModule
 
     /home/aolserver/servers/exampleServer/tcl/exampleModule
  
Line 36: Line 36:
 
: [[ns_info]] '''home''', [[ns_info]] '''tcllib'''
 
: [[ns_info]] '''home''', [[ns_info]] '''tcllib'''
  
----
 
  
[[Category Documentation]] - [[Category Core Tcl API]]
+
 
 +
[[Category:Documentation]] [[Category:Core Tcl API]]

Latest revision as of 19:51, 7 February 2009

Man page: http://aolserver.com/docs/tcl/ns_library.html


NAME

ns_library - Get the paths to the private and shared Tcl libraries

SYNOPSIS

ns_library library ?module?

DESCRIPTION

This command returns the path to the private and shared Tcl libraries, optionally specifying a module as well.

library must either be "private" or "shared". The private library is the same as what's returned from ns_info tcllib as defined in the config .tcl at server start-up. The shared library is relative to the path specified by ns_info home, in the "modules/tcl" subdirectory.

The optional module is simply concatenated to the path returned from ns_library.

EXAMPLES

   % ns_library shared
   /home/aolserver/modules/tcl
   % file join [ns_info home] modules tcl
   /home/aolserver/modules/tcl
   % ns_library private exampleModule
   /home/aolserver/servers/exampleServer/tcl/exampleModule
   % file join [ns_info tcllib] exampleModule
   /home/aolserver/servers/exampleServer/tcl/exampleModule

SEE ALSO

ns_info home, ns_info tcllib