Macaulay2 » Documentation
Packages » Macaulay2Doc » The Macaulay2 language » system facilities » file manipulation » fileMode » fileMode(File)
next | previous | forward | backward | up | index | toc

# fileMode(File) -- get file mode

- Function: fileMode
- Usage:
    `fileMode f`
- Inputs:
  - f, a file
- Outputs:
  - the mode of the open file f

## Description

    i1 : fn = temporaryFileName()

    o1 = /tmp/M2-29315-0/0

    i2 : f = fn << "hi there"

    o2 = /tmp/M2-29315-0/0

    o2 : File

    i3 : fileMode f

    o3 = 420

    i4 : close f

    o4 = /tmp/M2-29315-0/0

    o4 : File

    i5 : removeFile fn

## Ways to use this method:

- fileMode(File) -- get file mode

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