Mercurial > octave
annotate liboctave/system/file-ops.h @ 21881:aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
New arg to specify device separator character.
(file_ops::m_dev_sep_char): New data member.
(file_ops::dev_sep_char, file_ops::is_dev_sep): New functions.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sun, 12 Jun 2016 11:15:28 -0400 |
parents | 949cb46e6bdb |
children | ef91e43f162a |
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 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
102 // 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
|
103 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
|
104 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
105 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
|
106 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
107 if (ipos != std::string::npos) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
108 ipos++; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
109 else |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
110 ipos = 0; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
111 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
112 return path.substr (ipos); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
113 } |
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 // 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
|
116 static std::string native_separator_path (const std::string& path); |
7272 | 117 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
118 private: |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
119 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
120 static file_ops *instance; |
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 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
|
123 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
124 // No copying! |
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 file_ops (const file_ops&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
127 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
128 file_ops& operator = (const file_ops&); |
9182
23af5910e5f5
make load work for derived classses
Robert T. Short <octave@phaselockedsystems.com>
parents:
8920
diff
changeset
|
129 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
130 static bool instance_ok (void); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
131 |
21881
aea1bf9493c0
* file-ops.h, file-ops.cc (file_ops::file_ops): Now protected.
John W. Eaton <jwe@octave.org>
parents:
21752
diff
changeset
|
132 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
|
133 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
134 char m_dir_sep_char; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
135 std::string m_dir_sep_str; |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
136 std::string m_dir_sep_chars; |
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 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
139 // 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
|
140 // (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
|
141 // standard headers may be #defined. |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
142 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
143 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
144 mkdir (const std::string&, mode_t); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
145 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
146 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
147 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
|
148 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
149 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
150 mkfifo (const std::string&, mode_t); |
9182
23af5910e5f5
make load work for derived classses
Robert T. Short <octave@phaselockedsystems.com>
parents:
8920
diff
changeset
|
151 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
152 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
153 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
|
154 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
155 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
156 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
|
157 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
158 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
159 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
|
160 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
161 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
162 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
|
163 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
164 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
165 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
|
166 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
167 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
168 readlink (const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
169 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
170 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
171 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
|
172 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
173 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
174 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
|
175 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
176 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
177 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
|
178 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
179 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
180 rmdir (const std::string&); |
18410
073fbe7e6a3a
Use native separatos in __fltk_getfile__
John Donoghue <john.donoghue@ieee.org>
parents:
17744
diff
changeset
|
181 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
182 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
183 rmdir (const std::string&, std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
184 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
185 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
186 recursive_rmdir (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
187 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
188 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
189 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
|
190 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
191 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
192 umask (mode_t); |
8009
d936b21b3a6b
file_ops: use singleton class for static data members
John W. Eaton <jwe@octave.org>
parents:
8007
diff
changeset
|
193 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
194 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
195 unlink (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
196 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
197 extern OCTAVE_API int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
198 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
|
199 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
200 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
201 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
|
202 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
203 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
204 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
|
205 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
206 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
207 canonicalize_file_name (const std::string&); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
208 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
209 extern OCTAVE_API std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
210 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
|
211 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
212 } |
8007
a2ab20ba78f7
make file_ops a proper singleton class
John W. Eaton <jwe@octave.org>
parents:
7272
diff
changeset
|
213 |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
214 #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
|
215 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
216 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
|
217 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
|
218 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
219 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
|
220 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
221 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
|
222 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
223 return octave::sys::mkdir (nm, md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
224 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
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::mkdir' instead") |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
227 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
228 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
|
229 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
230 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
|
231 } |
1765 | 232 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
233 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
|
234 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
235 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
|
236 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
237 return octave::sys::mkfifo (nm, md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
238 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
239 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
240 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
|
241 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
242 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
|
243 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
244 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
|
245 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
246 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
247 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
|
248 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
249 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
|
250 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
251 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
|
252 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
253 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
254 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
|
255 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
256 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
|
257 std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
258 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
259 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
|
260 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
261 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
262 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
|
263 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
264 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
|
265 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
266 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
|
267 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
268 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
269 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
|
270 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
271 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
|
272 std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
273 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
274 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
|
275 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
276 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
277 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
|
278 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
279 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
|
280 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
281 return octave::sys::readlink (path, result); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
282 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
283 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
284 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
|
285 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
286 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
|
287 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
288 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
|
289 } |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
290 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
291 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
|
292 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
293 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
|
294 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
295 return octave::sys::rename (from, to); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
296 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
297 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
298 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
|
299 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
300 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
|
301 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
302 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
|
303 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
304 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
305 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
|
306 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
307 octave_rmdir (const std::string& nm) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
308 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
309 return octave::sys::rmdir (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
310 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
311 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
312 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
|
313 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
314 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
|
315 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
316 return octave::sys::rmdir (nm, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
317 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
318 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
319 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
|
320 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
321 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
|
322 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
323 return octave::sys::recursive_rmdir (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
324 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
325 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
326 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
|
327 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
328 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
|
329 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
330 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
|
331 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
332 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
333 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
|
334 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
335 octave_umask (mode_t md) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
336 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
337 return octave::sys::umask (md); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
338 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
339 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
340 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
|
341 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
342 octave_unlink (const std::string& nm) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
343 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
344 return octave::sys::unlink (nm); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
345 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
346 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
347 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
|
348 inline int |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
349 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
|
350 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
351 return octave::sys::unlink (nm, msg); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
352 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
353 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
354 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
|
355 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
356 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
|
357 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
358 return octave::sys::tempnam (dir, pfx); |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
359 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
360 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
361 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
|
362 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
363 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
|
364 std::string& msg) |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
365 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
366 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
|
367 } |
10197
4d433bd2d4dc
attempt to avoid trouble with gnulib #defines in a consistent way
John W. Eaton <jwe@octave.org>
parents:
10182
diff
changeset
|
368 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
369 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
|
370 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
371 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
|
372 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
373 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
|
374 } |
10252
2fcc927a8757
liboctave/file-ops.h: avoid gnulib #define for canonicalize_file_name
John W. Eaton <jwe@octave.org>
parents:
10197
diff
changeset
|
375 |
21752
949cb46e6bdb
use consistent style for deprecated function/class messages
John W. Eaton <jwe@octave.org>
parents:
21745
diff
changeset
|
376 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
|
377 inline std::string |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
378 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
|
379 { |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
380 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
|
381 } |
10252
2fcc927a8757
liboctave/file-ops.h: avoid gnulib #define for canonicalize_file_name
John W. Eaton <jwe@octave.org>
parents:
10197
diff
changeset
|
382 |
1765 | 383 #endif |
21733
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
384 |
cb0fdd941d84
use namespace for system file_ops class
John W. Eaton <jwe@octave.org>
parents:
21244
diff
changeset
|
385 #endif |