REBOL Programming/dirize

From Wikibooks, open books for an open world
< REBOL Programming
Jump to: navigation, search

Contents

USAGE: [edit]

DIRIZE path 

DESCRIPTION: [edit]

Returns a copy of the path turned into a directory.

DIRIZE is a function value.

ARGUMENTS [edit]

  • path -- (Type: file string url)

SOURCE CODE [edit]

dirize: func [
    {Returns a copy of the path turned into a directory.} 
    path [file! string! url!]
][
    either #"/" <> pick path length? path [join path #"/"] [copy path]
]