Read Me - Common Public License V1.0 - Copyright Notice(©)

init


>>-init(path-+------+-)----------------------------------------><
             +-,dir-+

Initializes a new File instance with the path [path] (after normalization).

If specified, [dir] is a parent path that is prepended to [path] . If [dir] is a File object then the absolute path of [dir] is prepended, otherwise [dir] is prepended as-is (after normalization). The normalization consists in adjusting the separators to the platform's convention and removing the final separator (if any).

Class FILE - init method


/* Windows */
file = .File~new("file")                     -- file
file = .File~new("c:\program files\")        -- c:\program files
file = .File~new("file", "c:/program files") -- c:\program files\file
'cd c:\program files\oorexx'
samples = .File~new("samples")               -- samples
file = .File~new("file", "samples")          -- samples\file
file = .File~new("file", samples)            -- c:\program files\oorexx\samples\file

/* Unix */
file = .File~new("/opt/ooRexx/")             -- /opt/ooRexx
'cd /opt/ooRexx'
samples = .File~new("samples")               -- samples
file = .File~new("file", "samples")          -- samples/file
file = .File~new("file", samples)            -- /opt/ooRexx/samples/file

Read Me - Common Public License V1.0 - Copyright Notice(©)