Mercurial > octave
annotate liboctave/system/file-ops.h @ 21752:949cb46e6bdb
use consistent style for deprecated function/class messages
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 20 May 2016 10:47:33 -0400 |
parents | bf1121302404 |
children | aea1bf9493c0 |
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 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
42 public: |
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 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
48 file_ops (char dir_sep_char_arg = 0, |
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 ("/")) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
51 : m_dir_sep_char (dir_sep_char_arg), m_dir_sep_str (dir_sep_str_arg), |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
52 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
|
53 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
54 typedef std::string (*tilde_expansion_hook) (const std::string&); |
4097 | 55 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
56 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
|
57 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
58 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
|
59 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
60 static string_vector tilde_additional_prefixes; |
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 string_vector tilde_additional_suffixes; |
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 char dir_sep_char (void) |
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 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
|
67 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
68 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
69 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
|
70 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
71 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
|
72 } |
4101 | 73 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
74 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
|
75 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
76 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
|
77 } |
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 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
|
80 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
81 std::string tmp = dir_sep_chars (); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
82 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
|
83 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
84 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
85 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
|
86 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
87 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
|
88 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
89 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
|
90 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
91 // 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
|
92 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
|
93 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
94 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
|
95 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
96 if (ipos != std::string::npos) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
97 ipos++; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
98 else |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
99 ipos = 0; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
100 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
101 return path.substr (ipos); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
102 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
103 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
104 // 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
|
105 static std::string native_separator_path (const std::string& path); |
7272 | 106 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
107 private: |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
108 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
109 static file_ops *instance; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
110 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
111 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
|
112 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
113 // No copying! |
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 file_ops (const file_ops&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
116 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
117 file_ops& operator = (const file_ops&); |
9182
23af5910e5f5
make load work for derived classses
Robert T. Short <octave@phaselockedsystems.com>
parents:
8920
diff
changeset
|
118 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
119 static bool instance_ok (void); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
120 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
121 char m_dir_sep_char; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
122 std::string m_dir_sep_str; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
123 std::string m_dir_sep_chars; |
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 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
126 // 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
|
127 // (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
|
128 // standard headers may be #defined. |
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 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
131 mkdir (const std::string&, mode_t); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
132 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
133 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
134 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
|
135 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
136 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
137 mkfifo (const std::string&, mode_t); |
9182
23af5910e5f5
make load work for derived classses
Robert T. Short <octave@phaselockedsystems.com>
parents:
8920
diff
changeset
|
138 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
139 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
140 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
|
141 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
142 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
143 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
|
144 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
145 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
146 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
|
147 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
148 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
149 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
|
150 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
151 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
152 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
|
153 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
154 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
155 readlink (const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
156 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
157 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
158 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
|
159 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
160 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
161 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
|
162 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
163 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
164 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
|
165 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
166 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
167 rmdir (const std::string&); |
18410
073fbe7e6a3a
Use native separatos in __fltk_getfile__
John Donoghue <john.donoghue@ieee.org>
parents:
17744
diff
changeset
|
168 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
169 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
170 rmdir (const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
171 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
172 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
173 recursive_rmdir (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
174 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
175 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
176 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
|
177 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
178 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
179 umask (mode_t); |
8009
d936b21b3a6b
file_ops: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents:
8007
diff
changeset
|
180 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
181 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
182 unlink (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
183 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
184 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
185 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
|
186 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
187 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
188 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
|
189 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
190 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
191 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
|
192 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
193 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
194 canonicalize_file_name (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
195 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
196 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
197 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
|
198 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
199 } |
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 #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
|
202 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
203 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
|
204 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
|
205 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
206 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
|
207 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
208 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
|
209 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
210 return octave::sys::mkdir (nm, md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
211 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
212 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
213 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
|
214 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
215 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
|
216 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
217 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
|
218 } |
1765 | 219 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
220 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
|
221 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
222 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
|
223 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
224 return octave::sys::mkfifo (nm, md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
225 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
226 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
227 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
|
228 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
229 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
|
230 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
231 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
|
232 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
233 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
234 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
|
235 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
236 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
|
237 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
238 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
|
239 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
240 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
241 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
|
242 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
243 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
|
244 std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
245 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
246 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
|
247 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
248 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
249 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
|
250 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
251 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
|
252 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
253 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
|
254 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
255 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
256 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
|
257 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
258 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
|
259 std::string& msg) |
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::symlink (old_name, new_name, msg); |
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::readlink' 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_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
|
267 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
268 return octave::sys::readlink (path, result); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
269 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
270 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
271 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
|
272 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
273 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
|
274 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
275 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
|
276 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
277 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
278 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
|
279 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
280 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
|
281 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
282 return octave::sys::rename (from, to); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
283 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
284 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
285 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
|
286 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
287 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
|
288 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
289 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
|
290 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
291 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
292 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
|
293 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
294 octave_rmdir (const std::string& nm) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
295 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
296 return octave::sys::rmdir (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
297 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
298 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
299 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
|
300 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
301 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
|
302 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
303 return octave::sys::rmdir (nm, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
304 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
305 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
306 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
|
307 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
308 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
|
309 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
310 return octave::sys::recursive_rmdir (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
311 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
312 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
313 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
|
314 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
315 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
|
316 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
317 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
|
318 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
319 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
320 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
|
321 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
322 octave_umask (mode_t md) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
323 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
324 return octave::sys::umask (md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
325 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
326 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
327 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
|
328 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
329 octave_unlink (const std::string& nm) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
330 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
331 return octave::sys::unlink (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
332 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
333 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
334 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
|
335 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
336 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
|
337 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
338 return octave::sys::unlink (nm, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
339 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
340 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
341 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
|
342 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
343 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
|
344 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
345 return octave::sys::tempnam (dir, pfx); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
346 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
347 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
348 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
|
349 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
350 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
|
351 std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
352 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
353 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
|
354 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
355 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
356 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
|
357 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
358 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
|
359 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
360 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
|
361 } |
10252
2fcc927a8757
liboctave/file-ops.h: avoid gnulib #define for canonicalize_file_name
John W. Eaton <jwe@octave.org>
parents:
10197
diff
changeset
|
362 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
363 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
|
364 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
365 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
|
366 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
367 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
|
368 } |
10252
2fcc927a8757
liboctave/file-ops.h: avoid gnulib #define for canonicalize_file_name
John W. Eaton <jwe@octave.org>
parents:
10197
diff
changeset
|
369 |
1765 | 370 #endif |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
371 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
372 #endif |