Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » Thing » File
next | previous | forward | backward | up | index | toc

# File -- the class of all files

## Description

Files may be input files, output files, pipes, or sockets. A list of currently open files may be obtained with openFiles.

## Functions and methods returning a file:

- `NetFile << Manipulator` -- see NetFile -- the class of all net files
- openIn(String) -- open an input file
- `openInOut(File)` -- see openInOut -- open an input output file
- `openInOut(String)` -- see openInOut -- open an input output file
- openListener(String) -- open a port for listening
- openOut(String) -- open an output file
- openOutAppend(String) -- open an output file for appending
- `File << Manipulator` -- see printing to a file -- print to a file
- `File << Symbol` -- see printing to a file -- print to a file
- `File << Thing` -- see printing to a file -- print to a file
- `Nothing << Thing` -- see printing to a file -- print to a file
- `String << Thing` -- see printing to a file -- print to a file

## Methods that use a file:

- atEndOfFile(File) -- test for end of file
- `echoOff(File)` -- see echoOff -- turn off echoing
- `echoOn(File)` -- see echoOn -- turn on echoing
- fileMode(File) -- get file mode
- fileMode(ZZ,File) -- set file mode
- `get(File)` -- see get -- get the contents of a file
- `getc(File)` -- see getc -- get a byte
- height(File) -- get window height
- isInputFile(File) -- whether a file is open for input
- isListener(File) -- whether a file is open for listening
- `isOpen(File)` -- see isOpen -- whether a file or database is open
- isOutputFile(File) -- whether a file is open for output
- isReady(File) -- whether a file has data available for reading
- `kill(File)` -- see kill -- kill a process
- `Manipulator File` -- see Manipulator -- the class of all file manipulators
- `File << Net` -- see printing to a file -- print to a file
- `File << String` -- see printing to a file -- print to a file
- read(File) -- read from a file
- read(File,ZZ) -- read from a file
- width(File) -- get window width

## Protected objects of class File:

- stderr -- the standard error output file
- stdio -- the standard input output file

## For the programmer

The object File is a type, with ancestor class Thing.

The source of this document is in /build/macaulay2-88fgJW/macaulay2-1.25.11+ds/M2/Macaulay2/packages/Macaulay2Doc/ov_files.m2:9:0.