#include <cstdlib>
#include <locale>
#include <codecvt>
#include "dir-ops.h"
#include "file-ops.h"
#include "file-stat.h"
#include "lo-error.h"
#include "lo-sysdep.h"
#include "localcharset-wrapper.h"
#include "putenv-wrapper.h"
#include "unistd-wrappers.h"
#include "unsetenv-wrapper.h"
Go to the source code of this file.
Functions | |
int | chdir (const std::string &path_arg) |
bool | dir_exists (const std::string &dirname) |
bool | dir_exists (const std::string &dirname, std::string &msg) |
bool | file_exists (const std::string &filename, bool is_dir) |
bool | file_exists (const std::string &filename, bool is_dir, std::string &msg) |
std::FILE * | fopen (const std::string &filename, const std::string &mode) |
std::FILE * | fopen_tmp (const std::string &name, const std::string &mode) |
std::fstream | fstream (const std::string &filename, const std::ios::openmode mode) |
std::string | get_ASCII_filename (const std::string &orig_file_name, const bool allow_locale) |
bool | get_dirlist (const std::string &dirname, string_vector &dirlist, std::string &msg) |
std::string | getcwd () |
std::string | getenv_wrapper (const std::string &name) |
std::ifstream | ifstream (const std::string &filename, const std::ios::openmode mode) |
bool | isenv_wrapper (const std::string &name) |
std::ofstream | ofstream (const std::string &filename, const std::ios::openmode mode) |
void | putenv_wrapper (const std::string &name, const std::string &value) |
bool | same_file (const std::string &file1, const std::string &file2) |
int | system (const std::string &cmd_str) |
std::string | u8_from_wstring (const std::wstring &wchar_string) |
std::wstring | u8_to_wstring (const std::string &utf8_string) |
int | unsetenv_wrapper (const std::string &name) |
int chdir | ( | const std::string & | path_arg | ) |
Definition at line 107 of file lo-sysdep.cc.
References octave_chdir_wrapper().
Referenced by octave_chdir_wrapper().
bool dir_exists | ( | const std::string & | dirname | ) |
Definition at line 389 of file lo-sysdep.cc.
References dirname(), base_file_stat::is_dir(), and u8_to_wstring().
bool dir_exists | ( | const std::string & | dirname, |
std::string & | msg | ||
) |
Definition at line 409 of file lo-sysdep.cc.
References dirname(), base_file_stat::error(), base_file_stat::is_dir(), and u8_to_wstring().
Definition at line 341 of file lo-sysdep.cc.
References base_file_stat::is_dir(), base_file_stat::is_reg(), and u8_to_wstring().
Referenced by rename().
Definition at line 362 of file lo-sysdep.cc.
References base_file_stat::error(), base_file_stat::is_dir(), base_file_stat::is_reg(), and u8_to_wstring().
std::FILE * fopen | ( | const std::string & | filename, |
const std::string & | mode | ||
) |
Definition at line 511 of file lo-sysdep.cc.
References u8_to_wstring().
std::FILE * fopen_tmp | ( | const std::string & | name, |
const std::string & | mode | ||
) |
Definition at line 583 of file lo-sysdep.cc.
References octave_unlink_wrapper().
std::fstream fstream | ( | const std::string & | filename, |
const std::ios::openmode | mode | ||
) |
Definition at line 607 of file lo-sysdep.cc.
References u8_to_wstring().
std::string get_ASCII_filename | ( | const std::string & | orig_file_name, |
const bool | allow_locale | ||
) |
Definition at line 814 of file lo-sysdep.cc.
References canonicalize_file_name(), free(), OCTAVE_LOCAL_BUFFER, octave_locale_charset_wrapper(), octave_u8_conv_to_encoding_strict(), u8_from_wstring(), and u8_to_wstring().
bool get_dirlist | ( | const std::string & | dirname, |
string_vector & | dirlist, | ||
std::string & | msg | ||
) |
Definition at line 120 of file lo-sysdep.cc.
References dir_entry::close(), dirname(), dir_entry::error(), dir_entry::read(), u8_from_wstring(), and u8_to_wstring().
Referenced by recursive_rmdir().
std::string getcwd | ( | ) |
Definition at line 72 of file lo-sysdep.cc.
References free(), octave_getcwd_wrapper(), and u8_from_wstring().
Referenced by octave_getcwd_wrapper().
std::string getenv_wrapper | ( | const std::string & | name | ) |
Definition at line 685 of file lo-sysdep.cc.
References u8_from_wstring(), and u8_to_wstring().
std::ifstream ifstream | ( | const std::string & | filename, |
const std::ios::openmode | mode | ||
) |
Definition at line 621 of file lo-sysdep.cc.
References u8_to_wstring().
bool isenv_wrapper | ( | const std::string & | name | ) |
Definition at line 711 of file lo-sysdep.cc.
References u8_to_wstring().
Referenced by env::isenv().
std::ofstream ofstream | ( | const std::string & | filename, |
const std::ios::openmode | mode | ||
) |
Definition at line 635 of file lo-sysdep.cc.
References u8_to_wstring().
void putenv_wrapper | ( | const std::string & | name, |
const std::string & | value | ||
) |
Definition at line 649 of file lo-sysdep.cc.
References len, octave_putenv_wrapper(), and u8_to_wstring().
Referenced by env::putenv(), and unsetenv_wrapper().
bool same_file | ( | const std::string & | file1, |
const std::string & | file2 | ||
) |
Definition at line 437 of file lo-sysdep.cc.
Referenced by rename().
int system | ( | const std::string & | cmd_str | ) |
Definition at line 60 of file lo-sysdep.cc.
References u8_to_wstring().
std::string u8_from_wstring | ( | const std::wstring & | wchar_string | ) |
Definition at line 746 of file lo-sysdep.cc.
Referenced by canonicalize_file_name(), get_ASCII_filename(), get_dirlist(), getcwd(), getenv_wrapper(), and dir_entry::read().
std::wstring u8_to_wstring | ( | const std::string & | utf8_string | ) |
Definition at line 723 of file lo-sysdep.cc.
Referenced by canonicalize_file_name(), dir_exists(), dir_exists(), file_exists(), file_exists(), fopen(), fstream(), get_ASCII_filename(), get_dirlist(), getenv_wrapper(), ifstream(), isenv_wrapper(), ofstream(), putenv_wrapper(), dir_entry::read(), rename(), system(), unsetenv_wrapper(), and windows_glob().
int unsetenv_wrapper | ( | const std::string & | name | ) |
Definition at line 698 of file lo-sysdep.cc.
References octave_unsetenv_wrapper(), putenv_wrapper(), and u8_to_wstring().