Fuzion Logo
fuzion-lang.dev — The Fuzion Language Portal
JavaScript seems to be disabled. Functionality is limited.

io/file.fz


# This file is part of the Fuzion language implementation.
#
# The Fuzion language implementation is free software: you can redistribute it
# and/or modify it under the terms of the GNU General Public License as published
# by the Free Software Foundation, version 3 of the License.
#
# The Fuzion language implementation is distributed in the hope that it will be
# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public
# License for more details.
#
# You should have received a copy of the GNU General Public License along with The
# Fuzion language implementation.  If not, see <https://www.gnu.org/licenses/>.


# -----------------------------------------------------------------------
#
#  Tokiwa Software GmbH, Germany
#
#  Source code of Fuzion standard library feature file
#
#  Author: Wael Youssfi (wael.youssfi@tokiwa.software)
#
# -----------------------------------------------------------------------

# file -- a unit type that contains effects related to file I/O
#
public file is

  # the mutate effect that is used
  # for reading/writing to file
  #
  module:public file_mutate : mutate is


  # short hand to get the writer instance
  # for the opened file of type file.this
  #
  public writer (io.buffered file_mutate).writer =>
    (io.buffered file_mutate).writer.env


  # short hand to get the reader instance
  # for the opened file of type file.this
  #
  public reader (io.buffered file_mutate).reader =>
    (io.buffered file_mutate).reader.env

  # NYI: BUG:
  # expected formal type: 'io.buffered io.this.file.this.file_mutate'
  # actual type found   : 'io.buffered io.file.this.file_mutate'
  # public buffered io.buffered file_mutate =>
  #   io.buffered file_mutate

last changed: 2025-07-10