[ Table Of Contents | Keyword Index ]

ns_hashpath(n) 4.99 "NaviServer Built-in Commands"

NAME

ns_hashpath - Break path into subdirectories

TABLE OF CONTENTS

    TABLE OF CONTENTS
    SYNOPSIS
    DESCRIPTION
    COMMANDS
    EXAMPLES
    SEE ALSO
    KEYWORDS

SYNOPSIS

ns_hashpath string levels

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