Mercurial > octave
annotate liboctave/system/file-ops.h @ 22146:ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
* file-ops.h (file_ops::dirname): New function.
* oct-shlib.cc (set_dll_directory): New function.
(octave_w32_shlib::octave_w32_shlib): Call file_ops::dirname to get
directory part of shared library file, then use set_dll_directory to
temporarily alter DLL search path.
* ov-java.cc (set_dll_directory): Delete.
(initialize_jvm): Don't set DLL search path for Windows systems here.
That job is now handled by octave::dynamic_library.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 19 Jul 2016 12:07:34 -0400 |
parents | aea1bf9493c0 |
children | c5842206aaea |
rev | line source |
---|---|
1765 | 1 /* |
2 | |
19697
4197fc428c7d
maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents:
18410
diff
changeset
|
3 Copyright (C) 1996-2015 John W. Eaton |
1765 | 4 |
5 This file is part of Octave. | |
6 | |
7 Octave is free software; you can redistribute it and/or modify it | |
8 under the terms of the GNU General Public License as published by the | |
7016 | 9 Free Software Foundation; either version 3 of the License, or (at your |
10 option) any later version. | |
1765 | 11 |
12 Octave is distributed in the hope that it will be useful, but WITHOUT | |
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
14 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
15 for more details. | |
16 | |
17 You should have received a copy of the GNU General Public License | |
7016 | 18 along with Octave; see the file COPYING. If not, see |
19 <http://www.gnu.org/licenses/>. | |
1765 | 20 |
21 */ | |
22 | |
20791
f7084eae3318
maint: Use Octave coding conventions for #if statements.
Rik <rik@octave.org>
parents:
20713
diff
changeset
|
23 #if ! defined (octave_file_ops_h) |
1765 | 24 #define octave_file_ops_h 1 |
25 | |
21244
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21017
diff
changeset
|
26 #include "octave-config.h" |
1473547f50f5
include octave-config.h in public header files
John W. Eaton <jwe@octave.org>
parents:
21017
diff
changeset
|
27 |
1765 | 28 #include <string> |
29 | |
2283 | 30 #include <sys/types.h> |
31 | |
3040 | 32 #include "str-vec.h" |
33 | |
21734
11af9c03400c
write namespace keyword and name on same line in C++ files
John W. Eaton <jwe@octave.org>
parents:
21733
diff
changeset
|
34 namespace octave |
1765 | 35 { |
21734
11af9c03400c
write namespace keyword and name on same line in C++ files
John W. Eaton <jwe@octave.org>
parents:
21733
diff
changeset
|
36 namespace sys |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
37 { |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
38 struct |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
39 OCTAVE_API |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
40 file_ops |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
41 { |
21881
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
42 protected: |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
43 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
44 // Use a singleton class for dir_sep data members instead of just |
21745
bf1121302404
use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents:
21734
diff
changeset
|
45 // making them static members of the file_ops class so that we |
bf1121302404
use namespace for dir_path class
John W. Eaton <jwe@octave.org>
parents:
21734
diff
changeset
|
46 // can ensure proper initialization. |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
47 |
21881
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
48 file_ops (char dev_sep_char_arg = 0, char dir_sep_char_arg = 0, |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
49 const std::string& dir_sep_str_arg = std::string ("/"), |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
50 const std::string& dir_sep_chars_arg = std::string ("/")) |
21881
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
51 : m_dev_sep_char (dev_sep_char_arg), |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
52 m_dir_sep_char (dir_sep_char_arg), |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
53 m_dir_sep_str (dir_sep_str_arg), |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
54 m_dir_sep_chars (dir_sep_chars_arg) { } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
55 |
21881
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
56 public: |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
57 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
58 typedef std::string (*tilde_expansion_hook) (const std::string&); |
4097 | 59 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
60 static tilde_expansion_hook tilde_expansion_preexpansion_hook; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
61 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
62 static tilde_expansion_hook tilde_expansion_failure_hook; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
63 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
64 static string_vector tilde_additional_prefixes; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
65 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
66 static string_vector tilde_additional_suffixes; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
67 |
21881
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
68 static char dev_sep_char (void) |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
69 { |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
70 return instance_ok () ? instance->m_dev_sep_char : 0; |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
71 } |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
72 |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
73 static bool is_dev_sep (char c); |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
74 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
75 static char dir_sep_char (void) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
76 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
77 return instance_ok () ? instance->m_dir_sep_char : 0; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
78 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
79 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
80 static std::string dir_sep_str (void) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
81 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
82 return instance_ok () ? instance->m_dir_sep_str : ""; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
83 } |
4101 | 84 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
85 static std::string dir_sep_chars (void) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
86 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
87 return instance_ok () ? instance->m_dir_sep_chars : ""; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
88 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
89 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
90 static bool is_dir_sep (char c) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
91 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
92 std::string tmp = dir_sep_chars (); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
93 return tmp.find (c) != std::string::npos; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
94 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
95 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
96 static std::string tilde_expand (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
97 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
98 static string_vector tilde_expand (const string_vector&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
99 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
100 static std::string concat (const std::string&, const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
101 |
22146
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
102 // Return the directory part of a filename or an empty string if |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
103 // there is no directory component. Does not check to see |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
104 // whether the file exists or is a directory. |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
105 static std::string dirname (const std::string& path) |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
106 { |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
107 size_t ipos = path.find_last_of (dir_sep_chars ()); |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
108 |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
109 return (ipos != std::string::npos) ? path.substr (0, ipos) : ""; |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
110 } |
ef91e43f162a
set DLL directory when loading DLLs on Windows systems (bug #48511)
John W. Eaton <jwe@octave.org>
parents:
21881
diff
changeset
|
111 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
112 // Return the tail member of a filename. |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
113 static std::string tail (const std::string& path) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
114 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
115 size_t ipos = path.find_last_of (dir_sep_chars ()); |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
116 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
117 if (ipos != std::string::npos) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
118 ipos++; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
119 else |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
120 ipos = 0; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
121 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
122 return path.substr (ipos); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
123 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
124 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
125 // convert path from UNIX type separators to whatever is the system separators |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
126 static std::string native_separator_path (const std::string& path); |
7272 | 127 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
128 private: |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
129 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
130 static file_ops *instance; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
131 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
132 static void cleanup_instance (void) { delete instance; instance = 0; } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
133 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
134 // No copying! |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
135 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
136 file_ops (const file_ops&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
137 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
138 file_ops& operator = (const file_ops&); |
9182
23af5910e5f5
make load work for derived classses
Robert T. Short <octave@phaselockedsystems.com>
parents:
8920
diff
changeset
|
139 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
140 static bool instance_ok (void); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
141 |
21881
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
142 char m_dev_sep_char; |
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
143 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
144 char m_dir_sep_char; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
145 std::string m_dir_sep_str; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
146 std::string m_dir_sep_chars; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
147 }; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
148 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
149 // We don't have these in the file_ops class with their simple names |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
150 // (i.e., mkdir instead of octave_mdir) because function names in |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
151 // standard headers may be #defined. |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
152 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
153 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
154 mkdir (const std::string&, mode_t); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
155 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
156 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
157 mkdir (const std::string&, mode_t, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
158 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
159 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
160 mkfifo (const std::string&, mode_t); |
9182
23af5910e5f5
make load work for derived classses
Robert T. Short <octave@phaselockedsystems.com>
parents:
8920
diff
changeset
|
161 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
162 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
163 mkfifo (const std::string&, mode_t, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
164 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
165 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
166 link (const std::string&, const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
167 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
168 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
169 link (const std::string&, const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
170 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
171 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
172 symlink (const std::string&, const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
173 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
174 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
175 symlink (const std::string&, const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
176 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
177 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
178 readlink (const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
179 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
180 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
181 readlink (const std::string&, std::string&, std::string&); |
9182
23af5910e5f5
make load work for derived classses
Robert T. Short <octave@phaselockedsystems.com>
parents:
8920
diff
changeset
|
182 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
183 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
184 rename (const std::string&, const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
185 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
186 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
187 rename (const std::string&, const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
188 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
189 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
190 rmdir (const std::string&); |
18410
073fbe7e6a3a
Use native separatos in __fltk_getfile__
John Donoghue <john.donoghue@ieee.org>
parents:
17744
diff
changeset
|
191 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
192 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
193 rmdir (const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
194 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
195 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
196 recursive_rmdir (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
197 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
198 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
199 recursive_rmdir (const std::string&, std::string&); |
8007
a2ab20ba78f7
make file_ops a proper singleton class
John W. Eaton <jwe@octave.org>
parents:
7272
diff
changeset
|
200 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
201 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
202 umask (mode_t); |
8009
d936b21b3a6b
file_ops: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents:
8007
diff
changeset
|
203 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
204 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
205 unlink (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
206 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
207 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
208 unlink (const std::string&, std::string&); |
13983
7dd7cccf0757
clean up memory allocated for singletons before exit
John W. Eaton <jwe@octave.org>
parents:
11523
diff
changeset
|
209 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
210 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
211 tempnam (const std::string&, const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
212 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
213 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
214 tempnam (const std::string&, const std::string&, std::string&); |
8009
d936b21b3a6b
file_ops: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents:
8007
diff
changeset
|
215 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
216 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
217 canonicalize_file_name (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
218 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
219 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
220 canonicalize_file_name (const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
221 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
222 } |
8007
a2ab20ba78f7
make file_ops a proper singleton class
John W. Eaton <jwe@octave.org>
parents:
7272
diff
changeset
|
223 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
224 #if defined (OCTAVE_USE_DEPRECATED_FUNCTIONS) |
8007
a2ab20ba78f7
make file_ops a proper singleton class
John W. Eaton <jwe@octave.org>
parents:
7272
diff
changeset
|
225 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
226 OCTAVE_DEPRECATED ("use 'octave::sys::file_ops' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
227 typedef octave::sys::file_ops file_ops; |
8009
d936b21b3a6b
file_ops: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents:
8007
diff
changeset
|
228 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
229 OCTAVE_DEPRECATED ("use 'octave::sys::mkdir' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
230 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
231 octave_mkdir (const std::string& nm, mode_t md) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
232 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
233 return octave::sys::mkdir (nm, md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
234 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
235 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
236 OCTAVE_DEPRECATED ("use 'octave::sys::mkdir' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
237 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
238 octave_mkdir (const std::string& nm, mode_t md, std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
239 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
240 return octave::sys::mkdir (nm, md, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
241 } |
1765 | 242 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
243 OCTAVE_DEPRECATED ("use 'octave::sys::mkfifo' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
244 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
245 octave_mkfifo (const std::string& nm, mode_t md) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
246 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
247 return octave::sys::mkfifo (nm, md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
248 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
249 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
250 OCTAVE_DEPRECATED ("use 'octave::sys::mkfifo' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
251 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
252 octave_mkfifo (const std::string& nm, mode_t md, std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
253 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
254 return octave::sys::mkfifo (nm, md, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
255 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
256 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
257 OCTAVE_DEPRECATED ("use 'octave::sys::link' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
258 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
259 octave_link (const std::string& old_name, const std::string& new_name) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
260 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
261 return octave::sys::link (old_name, new_name); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
262 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
263 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
264 OCTAVE_DEPRECATED ("use 'octave::sys::link' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
265 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
266 octave_link (const std::string& old_name, const std::string& new_name, |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
267 std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
268 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
269 return octave::sys::link (old_name, new_name, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
270 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
271 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
272 OCTAVE_DEPRECATED ("use 'octave::sys::symlink' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
273 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
274 octave_symlink (const std::string& old_name, const std::string& new_name) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
275 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
276 return octave::sys::symlink (old_name, new_name); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
277 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
278 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
279 OCTAVE_DEPRECATED ("use 'octave::sys::symlink' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
280 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
281 octave_symlink (const std::string& old_name, const std::string& new_name, |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
282 std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
283 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
284 return octave::sys::symlink (old_name, new_name, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
285 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
286 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
287 OCTAVE_DEPRECATED ("use 'octave::sys::readlink' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
288 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
289 octave_readlink (const std::string& path, std::string& result) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
290 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
291 return octave::sys::readlink (path, result); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
292 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
293 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
294 OCTAVE_DEPRECATED ("use 'octave::sys::readlink' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
295 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
296 octave_readlink (const std::string& path, std::string& result, std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
297 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
298 return octave::sys::readlink (path, result, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
299 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
300 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
301 OCTAVE_DEPRECATED ("use 'octave::sys::rename' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
302 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
303 octave_rename (const std::string& from, const std::string& to) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
304 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
305 return octave::sys::rename (from, to); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
306 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
307 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
308 OCTAVE_DEPRECATED ("use 'octave::sys::rename' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
309 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
310 octave_rename (const std::string& from, const std::string& to, std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
311 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
312 return octave::sys::rename (from, to, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
313 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
314 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
315 OCTAVE_DEPRECATED ("use 'octave::sys::rmdir' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
316 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
317 octave_rmdir (const std::string& nm) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
318 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
319 return octave::sys::rmdir (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
320 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
321 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
322 OCTAVE_DEPRECATED ("use 'octave::sys::rmdir' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
323 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
324 octave_rmdir (const std::string& nm, std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
325 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
326 return octave::sys::rmdir (nm, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
327 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
328 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
329 OCTAVE_DEPRECATED ("use 'octave::sys::recursive_rmdir' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
330 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
331 octave_recursive_rmdir (const std::string& nm) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
332 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
333 return octave::sys::recursive_rmdir (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
334 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
335 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
336 OCTAVE_DEPRECATED ("use 'octave::sys::recursive_rmdir' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
337 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
338 octave_recursive_rmdir (const std::string& nm, std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
339 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
340 return octave::sys::recursive_rmdir (nm, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
341 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
342 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
343 OCTAVE_DEPRECATED ("use 'octave::sys::umask' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
344 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
345 octave_umask (mode_t md) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
346 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
347 return octave::sys::umask (md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
348 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
349 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
350 OCTAVE_DEPRECATED ("use 'octave::sys::unlink' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
351 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
352 octave_unlink (const std::string& nm) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
353 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
354 return octave::sys::unlink (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
355 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
356 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
357 OCTAVE_DEPRECATED ("use 'octave::sys::unlink' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
358 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
359 octave_unlink (const std::string& nm, std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
360 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
361 return octave::sys::unlink (nm, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
362 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
363 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
364 OCTAVE_DEPRECATED ("use 'octave::sys::tempnam' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
365 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
366 octave_tempnam (const std::string& dir, const std::string& pfx) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
367 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
368 return octave::sys::tempnam (dir, pfx); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
369 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
370 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
371 OCTAVE_DEPRECATED ("use 'octave::sys::tempnam' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
372 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
373 octave_tempnam (const std::string& dir, const std::string& pfx, |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
374 std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
375 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
376 return octave::sys::tempnam (dir, pfx, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
377 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
378 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
379 OCTAVE_DEPRECATED ("use 'octave::sys::canonicalize_file_name' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
380 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
381 octave_canonicalize_file_name (const std::string& nm) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
382 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
383 return octave::sys::canonicalize_file_name (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
384 } |
10252
2fcc927a8757
liboctave/file-ops.h: avoid gnulib #define for canonicalize_file_name
John W. Eaton <jwe@octave.org>
parents:
10197
diff
changeset
|
385 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
386 OCTAVE_DEPRECATED ("use 'octave::sys::canonicalize_file_name' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
387 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
388 octave_canonicalize_file_name (const std::string& nm, std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
389 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
390 return octave::sys::canonicalize_file_name (nm, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
391 } |
10252
2fcc927a8757
liboctave/file-ops.h: avoid gnulib #define for canonicalize_file_name
John W. Eaton <jwe@octave.org>
parents:
10197
diff
changeset
|
392 |
1765 | 393 #endif |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
394 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
395 #endif |