#include <cerrno>
#include <cstdio>
#include <iomanip>
#include <string>
#include "file-ops.h"
#include "file-stat.h"
#include "iconv-wrappers.h"
#include "lo-ieee.h"
#include "lo-sysdep.h"
#include "localcharset-wrapper.h"
#include "mkostemp-wrapper.h"
#include "oct-env.h"
#include "oct-locbuf.h"
#include "tmpfile-wrapper.h"
#include "unistd-wrappers.h"
#include "builtin-defun-decls.h"
#include "defun.h"
#include "error.h"
#include "errwarn.h"
#include "file-io.h"
#include "interpreter-private.h"
#include "interpreter.h"
#include "load-path.h"
#include "oct-fstrm.h"
#include "oct-iostrm.h"
#include "oct-map.h"
#include "oct-prcstrm.h"
#include "oct-stream.h"
#include "oct-strstrm.h"
#include "ov.h"
#include "ovl.h"
#include "pager.h"
#include "sysdep.h"
#include "utils.h"
#include "variables.h"
Go to the source code of this file.
void cleanup_tmp_files | ( | void | ) |
Definition at line 3225 of file file-io.cc.
References octave::__get_interpreter__(), and octave::interpreter::cleanup_tmp_files().
|
static |
Definition at line 3158 of file file-io.cc.
References octave_value_list::length(), octave_value(), and print_usage().
|
static |
Definition at line 3094 of file file-io.cc.
References octave_value_list::length(), octave_value(), and print_usage().
Referenced by FSEEK_CUR(), FSEEK_END(), FSEEK_SET(), Fstderr(), Fstdin(), and Fstdout().
|
static |
Definition at line 3032 of file file-io.cc.
References error(), retval, and x.
Referenced by octave::jit_function::do_return(), and Fumask().
|
static |
Definition at line 2325 of file file-io.cc.
References error(), octave_value::int_value(), octave::stream::read(), oct_data_conv::string_to_data_type(), octave::mach_info::string_to_float_format(), octave_value::xstring_value(), and octave_value::xvector_value().
Referenced by Ffread().
|
static |
Definition at line 2567 of file file-io.cc.
References error(), octave_value::int_value(), oct_data_conv::string_to_data_type(), octave::mach_info::string_to_float_format(), octave::stream::write(), and octave_value::xstring_value().
Referenced by Ffwrite().
|
static |
Definition at line 465 of file file-io.cc.
References do_stream_open(), name, retval, and octave_value::xstring_value().
|
static |
Definition at line 388 of file file-io.cc.
References octave_stdiostream::create(), octave_zstdiostream::create(), error(), octave::find_data_file_in_load_path(), octave::sys::fopen(), fopen_mode_to_ios_mode(), octave::sys::base_file_stat::is_dir(), name, normalize_fopen_mode(), octave_iconv_close_wrapper(), octave_iconv_open_wrapper(), retval, octave::mach_info::string_to_float_format(), octave::sys::file_ops::tilde_expand(), and transform().
Referenced by do_stream_open(), and Ffopen().
OCTAVE_EXPORT octave_value_list F__textscan__ | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 1528 of file file-io.cc.
References print_usage(), and textscan_internal().
OCTAVE_EXPORT octave_value_list Ffclear | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 204 of file file-io.cc.
References octave::stream::clearerr(), octave::stream_list::get_file_number(), octave::stream_list::lookup(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Ffclose | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 188 of file file-io.cc.
References ovl(), print_usage(), and octave::stream_list::remove().
OCTAVE_EXPORT octave_value_list Ffeof | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2670 of file file-io.cc.
References octave::stream::eof(), octave::stream_list::lookup(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Fferror | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2701 of file file-io.cc.
References octave::stream::error(), octave::stream_list::lookup(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Ffflush | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 233 of file file-io.cc.
References octave::stream::flush(), octave::flush_stdout(), octave::stream_list::get_file_number(), octave::stream_list::lookup(), print_usage(), and retval.
Referenced by gnuplot_graphics_toolkit::send_quit().
OCTAVE_EXPORT octave_value_list Ffgetl | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 278 of file file-io.cc.
References octave::stream::getl(), octave::stream_list::lookup(), octave_value(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Ffgets | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 320 of file file-io.cc.
References octave::stream::gets(), octave::stream_list::lookup(), octave_value(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Ffopen | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | nargout | ||
) |
Definition at line 589 of file file-io.cc.
References do_stream_open(), octave::stream::error(), octave::stream_list::get_info(), octave::stream_list::insert(), octave::input_system::mfile_encoding(), octave_locale_charset_wrapper(), octave_value(), octave::stream_list::open_file_numbers(), ovl(), print_usage(), retval, and octave_value::string_value().
OCTAVE_EXPORT octave_value_list Ffprintf | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | nargout | ||
) |
Definition at line 838 of file file-io.cc.
References printf_internal().
OCTAVE_EXPORT octave_value_list Ffputs | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 897 of file file-io.cc.
References puts_internal().
Referenced by gnuplot_graphics_toolkit::send_quit().
OCTAVE_EXPORT octave_value_list Ffread | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2524 of file file-io.cc.
References do_fread(), octave_value::is_string(), lo_ieee_inf_value(), octave::stream_list::lookup(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Ffreport | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 684 of file file-io.cc.
References octave::stream_list::list_open_files(), octave_stdout, ovl(), and warning().
OCTAVE_EXPORT octave_value_list Ffrewind | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | nargout | ||
) |
Definition at line 706 of file file-io.cc.
References octave::stream_list::lookup(), ovl(), print_usage(), and octave::stream::rewind().
OCTAVE_EXPORT octave_value_list Ffscanf | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 1074 of file file-io.cc.
References scanf_internal().
OCTAVE_EXPORT octave_value_list Ffseek | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 742 of file file-io.cc.
References octave::stream_list::lookup(), octave_value(), ovl(), print_usage(), and octave::stream::seek().
OCTAVE_EXPORT octave_value_list Ffskipl | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 362 of file file-io.cc.
References octave::stream_list::lookup(), octave_value(), ovl(), print_usage(), and octave::stream::skipl().
OCTAVE_EXPORT octave_value_list Fftell | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 764 of file file-io.cc.
References octave::stream_list::lookup(), ovl(), print_usage(), and octave::stream::tell().
OCTAVE_EXPORT octave_value_list Ffwrite | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2624 of file file-io.cc.
References do_fwrite(), octave_value::is_string(), octave::stream_list::lookup(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Fmkstemp | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2973 of file file-io.cc.
References octave_stdiostream::create(), error(), fopen_mode_to_ios_mode(), octave::stream_list::insert(), is_true(), OCTAVE_LOCAL_BUFFER, octave_mkostemp_wrapper(), ovl(), print_usage(), and retval.
|
static |
Definition at line 140 of file file-io.cc.
References error(), retval, and octave::math::trunc().
Referenced by do_stream_open(), Fmkstemp(), and Ftmpfile().
OCTAVE_EXPORT octave_value_list FP_tmpdir | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3113 of file file-io.cc.
References octave::get_P_tmpdir(), ovl(), and print_usage().
OCTAVE_EXPORT octave_value_list Fpclose | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2801 of file file-io.cc.
References ovl(), print_usage(), and octave::stream_list::remove().
Referenced by gnuplot_graphics_toolkit::send_quit().
OCTAVE_EXPORT octave_value_list Fpopen | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2764 of file file-io.cc.
References octave_iprocstream::create(), octave_oprocstream::create(), error(), octave::stream_list::insert(), name, print_usage(), and retval.
OCTAVE_EXPORT octave_value_list Fprintf | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | nargout | ||
) |
Definition at line 861 of file file-io.cc.
References octave_value_list::prepend(), and printf_internal().
OCTAVE_EXPORT octave_value_list Fputs | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 915 of file file-io.cc.
References octave_value_list::prepend(), and puts_internal().
OCTAVE_EXPORT octave_value_list Fscanf | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 1171 of file file-io.cc.
References octave_value_list::prepend(), and scanf_internal().
OCTAVE_EXPORT octave_value_list FSEEK_CUR | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3141 of file file-io.cc.
References const_value().
OCTAVE_EXPORT octave_value_list FSEEK_END | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3152 of file file-io.cc.
References const_value().
OCTAVE_EXPORT octave_value_list FSEEK_SET | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3130 of file file-io.cc.
References const_value().
OCTAVE_EXPORT octave_value_list Fsprintf | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 938 of file file-io.cc.
References octave::stream::error(), error(), octave_value::is_sq_string(), octave_value::is_string(), octave::stream::is_valid(), octave_value(), print_usage(), octave::stream::printf(), octave_value_list::resize(), retval, and octave_ostrstream::str().
Referenced by Ferror(), and handle_message().
OCTAVE_EXPORT octave_value_list Fsscanf | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 1107 of file file-io.cc.
References Array< double >, octave_istrstream::create(), octave::stream::eof(), octave::stream::error(), error(), get_scan_string_data(), octave::stream::is_valid(), lo_ieee_inf_value(), octave::stream::oscanf(), ovl(), print_usage(), retval, octave::stream::scanf(), and octave::stream::tell().
OCTAVE_EXPORT octave_value_list Fstderr | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 3204 of file file-io.cc.
References const_value(), and octave::stream_list::stderr_file().
OCTAVE_EXPORT octave_value_list Fstdin | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 3175 of file file-io.cc.
References const_value(), and octave::stream_list::stdin_file().
OCTAVE_EXPORT octave_value_list Fstdout | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 3189 of file file-io.cc.
References const_value(), and octave::stream_list::stdout_file().
OCTAVE_EXPORT octave_value_list Ftempname | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 2829 of file file-io.cc.
References octave::sys::env::getenv(), ovl(), print_usage(), and octave::sys::tempnam().
OCTAVE_EXPORT octave_value_list Ftextscan | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 1516 of file file-io.cc.
References textscan_internal().
OCTAVE_EXPORT octave_value_list Ftmpfile | ( | octave::interpreter & | interp, |
const octave_value_list & | args, | ||
int | |||
) |
Definition at line 2917 of file file-io.cc.
References octave_stdiostream::create(), error(), fopen_mode_to_ios_mode(), octave::stream_list::insert(), octave_tmpfile_wrapper(), ovl(), print_usage(), and retval.
OCTAVE_EXPORT octave_value_list Fumask | ( | const octave_value_list & | args, |
int | |||
) |
Definition at line 3073 of file file-io.cc.
References convert(), error(), ovl(), print_usage(), and octave::sys::umask().
|
static |
Definition at line 1082 of file file-io.cc.
References error(), octave_value::is_string(), octave_value::numel(), octave_value::reshape(), retval, and octave_value::string_value().
Referenced by Fsscanf(), and textscan_internal().
void mark_for_deletion | ( | const std::string & | file | ) |
Definition at line 3215 of file file-io.cc.
References octave::__get_interpreter__(), and octave::interpreter::mark_for_deletion().
|
static |
Definition at line 88 of file file-io.cc.
References err_disabled_feature().
Referenced by do_stream_open().
|
static |
Definition at line 777 of file file-io.cc.
References error(), octave::interpreter::get_stream_list(), octave_value_list::length(), octave::stream_list::lookup(), ovl(), print_usage(), octave::stream::printf(), and octave_value_list::resize().
Referenced by Ffprintf(), and Fprintf().
|
static |
Definition at line 872 of file file-io.cc.
References octave::interpreter::get_stream_list(), octave_value_list::length(), octave::stream_list::lookup(), ovl(), print_usage(), and octave::stream::puts().
|
static |
Definition at line 988 of file file-io.cc.
References Array< double >, octave::stream::error(), error(), octave::interpreter::get_stream_list(), octave_value_list::length(), lo_ieee_inf_value(), octave::stream_list::lookup(), octave::stream::oscanf(), ovl(), print_usage(), retval, and octave::stream::scanf().
|
static |
Definition at line 1181 of file file-io.cc.
References octave_istrstream::create(), octave::do_string_escapes(), octave::stream::error(), error(), get_scan_string_data(), octave::interpreter::get_stream_list(), octave::stream::is_valid(), octave_value_list::length(), octave::stream_list::lookup(), ovl(), print_usage(), octave_value_list::splice(), and octave::stream::textscan().
Referenced by F__textscan__(), and Ftextscan().