Jump to content

Rebol Programming/dirize

From Wikibooks, open books for an open world

USAGE:

[edit | edit source]
DIRIZE path 

DESCRIPTION:

[edit | edit source]

Returns a copy of the path turned into a directory.

DIRIZE is a function value.

ARGUMENTS

[edit | edit source]
  • path -- (Type: file string url)

SOURCE CODE

[edit | edit source]
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]
]