Google

FILE-EXT File-access + extensions

The Optional File-Access Word Set and File-Access Extension Words. These words imply some kind of file-system unlike the BLOCK wordset.



BIN ( access-mode -- access-mode' )  
ansi 11.6.1.0765
modify the give file access-mode to be a binary-mode

reference: p4_bin in ../src/file.c:0042, export CO BIN

CLOSE-FILE ( file -- code )  
ansi 11.6.1.0900
close the file and return the status-code

reference: p4_close_file in ../src/file.c:0050, export CO CLOSE-FILE

CREATE-FILE ( str-adr str-len mode -- file code )  
ansi 11.6.1.1010
create the file with the given name and open it - returns the file id and a status code. A code of zero means success. An existing file of the same name is truncated upon open.

reference: p4_create_file in ../src/file.c:0063, export CO CREATE-FILE

DELETE-FILE ( str-adr str-len -- code )  
ansi 11.6.1.1190
delete the named file and return a status code

reference: p4_delete_file in ../src/file.c:0078, export CO DELETE-FILE

FILE-POSITION ( file -- p.pos code )  
ansi 11.6.1.1520
return the current position in the file and return a status code. A code of zero means success.

reference: p4_file_position in ../src/file.c:0093, export CO FILE-POSITION

FILE-SIZE ( file -- s.size code )  
ansi 11.6.1.1522
return the current size of the file and return a status code. A code of zero means success.

reference: p4_file_size in ../src/file.c:0117, export CO FILE-SIZE

INCLUDE-FILE ( file -- )  
ansi 11.6.1.1717
INTERPRET the given file

reference: p4_include_file in ../src/file.c:0140, export CO INCLUDE-FILE

INCLUDED ( str-adr str-len -- )  
ansi 11.6.1.1718
open the named file and then INCLUDE-FILE see also the interactive INCLUDE

reference: p4_included in ../src/file.c:0149, export CO INCLUDED

OPEN-FILE ( str-adr str-len mode -- file code )  
ansi 11.6.1.1970
open the named file with mode. returns the file id and a status code. A code of zero means success.

reference: p4_open_file in ../src/file.c:0163, export CO OPEN-FILE

R/O
constant ansi 11.6.1.2054

no documentation available   (FMODE_RO)

  • see the ANSI Documentation of this word : ansi 11.6.1.2054

reference: FMODE_RO in ../src/file.c:0343, export OC R/O

R/W
constant ansi 11.6.1.2056

no documentation available   (FMODE_RW)

  • see the ANSI Documentation of this word : ansi 11.6.1.2056

reference: FMODE_RW in ../src/file.c:0344, export OC R/W

READ-FILE ( str-adr str-len file -- count code )  
ansi 11.6.1.2080
fill the given string buffer with characters from the buffer. A status code of zero means success and the returned count gives the number of bytes actually read. If an error occurs the number of already transferred bytes is returned.

reference: p4_read_file in ../src/file.c:0183, export CO READ-FILE

READ-LINE ( str-adr str-len file -- count flag code )  
ansi 11.6.1.2090
fill the given string buffer with one line from the file. A line termination character (or character sequence under WIN/DOS) may also be placed in the buffer but is not included in the final count. In other respects this function performs a READ-FILE

reference: p4_read_line in ../src/file.c:0203, export CO READ-LINE

REPOSITION-FILE ( o.offset file -- code )  
ansi 11.6.1.2142
reposition the file offset - the next FILE-POSITION would return o.offset then. returns a status code.

reference: p4_reposition_file in ../src/file.c:0220, export CO REPOSITION-FILE

RESIZE-FILE ( s.size file -- code )  
ansi 11.6.1.2147
resize the give file, returns a status code.

reference: p4_resize_file in ../src/file.c:0232, export CO RESIZE-FILE

W/O
constant ansi 11.6.1.2425

no documentation available   (FMODE_WO)

  • see the ANSI Documentation of this word : ansi 11.6.1.2425

reference: FMODE_WO in ../src/file.c:0349, export OC W/O

WRITE-FILE ( str-adr str-len file -- code )  
ansi 11.6.1.2480
write characters from the string buffer to a file, returns a status code.

reference: p4_write_file in ../src/file.c:0248, export CO WRITE-FILE

WRITE-LINE ( str-adr str-len file -- )  
ansi 11.6.1.2485
write characters from the string buffer to a file, and add the line-terminator to the end of it. returns a status code.

reference: p4_write_line in ../src/file.c:0263, export CO WRITE-LINE

FILE-STATUS ( str-adr str-len -- sub-code code )  
ansi 11.6.2.1524
check the named file - if it exists the status code is zero. The sub-code is implementation-specific.

reference: p4_file_status in ../src/file.c:0279, export CO FILE-STATUS

FLUSH-FILE ( file -- code )  
ansi 11.6.2.1560
flush all unsaved buffers of the file to disk. A status code of zero means success.

reference: p4_flush_file in ../src/file.c:0299, export CO FLUSH-FILE

RENAME-FILE ( str-adr1 str-len1 str-adr2 str-len2 -- code )  
ansi 11.6.2.2130
rename the file named by string1 to the name of string2. returns a status-code

reference: p4_rename_file in ../src/file.c:0321, export CO RENAME-FILE