Rebol Programming/to-relative-file

= USAGE: = TO-RELATIVE-FILE file /no-copy /as-rebol /as-local

= DESCRIPTION: = Returns the relative portion of a file if in a subdirectory, or the original if not.

TO-RELATIVE-FILE is a function value. = ARGUMENTS =
 * file -- File to check (local if string!) (Type: file string)

= REFINEMENTS =
 * /no-copy -- Don't copy, just reference
 * /as-rebol -- Convert to REBOL-style filename if not
 * /as-local -- Convert to local-style filename if not

= SOURCE CODE = to-relative-file: func [ {Returns the relative portion of a file if in a subdirectory, or the original if not.} file [file! string!] "File to check (local if string!)" /no-copy "Don't copy, just reference" /as-rebol "Convert to REBOL-style filename if not" /as-local "Convert to local-style filename if not" /local tmp ]