File! datatype

1. Abstract

File! values represent file names or directory names and paths.

File! is a member of the following typesets: any-string!, series!

2. Creation

File! values can be created using literal syntax, or at runtime by using a make constructor or to conversion.

>> %file-literal
== %file-literal
>> make file! 'foo
== %foo

>> make file! "bar"
== %bar

>> make file! [a long file name]
== %alongfilename
>> to file! "foo"
== %foo

>> to file! [foo bar baz]
== %foobarbaz

3. Literal syntax

A percent sign % followed by one or more non whitespace characters, or by zero or more characters enclosed in " ". Whitespace characters must be escaped with %<hex> values unless enclosed in " ".



%"foo bar baz"

4. Comparisons

All comparators can be applied on file!: =, ==, <>, >, <, >=, <=, =?. In addition, min, and max are also supported.

5. Testing values

Use file? to check if a value is of the file! datatype.

>> file? %foo
== true

Use type? to return the datatype of a given value.

>> type? %bar
== file!

6. Pre-defined words

6.1. Actions

delete, modify, query, read, write

6.2. Functions

cd, change-dir, clean-path, dir?, dirize, do-file, do-thru, exists-thru?, file?, flip-exe-flag, list-dir, load, load-thru, make-dir, normalize-dir, path-thru, read-thru, request-dir, request-file, save, split-path, suffix?, to-file, to-red-file

6.3. Natives

browse, call, checksum, dehex

results matching ""

    No results matching ""