NaviServer - programmable web server
4.99  5.0

[ Main Table Of Contents | Table Of Contents | Keyword Index ]

ns_hashpath(n) 4.99.30 naviserver "NaviServer Built-in Commands"

Name

ns_hashpath - Break path into subdirectories

Table Of Contents

Synopsis

Description

Hash the leading characters of string into a path, skipping periods and slashes. If string contains less characters than levels requested, '_' characters are used as padding. For example, given the string 'foo' and the levels 2, 3: foo, 2 -> /f/o foo, 3 -> /f/o/o

COMMANDS

ns_hashpath string levels

string Path to be broken

levels How many subdirecotries to make

EXAMPLES

 oss2:nscp 13> ns_hashpath foo 3
 /f/o/o

See Also

nsd

Keywords

NaviServer, global built-in