1765
|
1 /* |
|
2 |
2847
|
3 Copyright (C) 1996, 1997 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 |
|
9 Free Software Foundation; either version 2, or (at your option) any |
|
10 later version. |
|
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 |
|
18 along with Octave; see the file COPYING. If not, write to the Free |
5307
|
19 Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
20 02110-1301, USA. |
1765
|
21 |
|
22 */ |
|
23 |
|
24 #if !defined (octave_file_ops_h) |
|
25 #define octave_file_ops_h 1 |
|
26 |
|
27 #include <string> |
|
28 |
2283
|
29 #ifdef HAVE_SYS_TYPES_H |
|
30 #include <sys/types.h> |
|
31 #endif |
|
32 |
3040
|
33 #include "str-vec.h" |
|
34 |
2926
|
35 struct |
6108
|
36 OCTAVE_API |
2926
|
37 file_ops |
1765
|
38 { |
3504
|
39 static int mkdir (const std::string&, mode_t); |
|
40 static int mkdir (const std::string&, mode_t, std::string&); |
1765
|
41 |
3504
|
42 static int mkfifo (const std::string&, mode_t); |
|
43 static int mkfifo (const std::string&, mode_t, std::string&); |
1765
|
44 |
3710
|
45 static int link (const std::string&, const std::string&); |
|
46 static int link (const std::string&, const std::string&, std::string&); |
|
47 |
|
48 static int symlink (const std::string&, const std::string&); |
|
49 static int symlink (const std::string&, const std::string&, std::string&); |
|
50 |
|
51 static int readlink (const std::string&, std::string&); |
|
52 static int readlink (const std::string&, std::string&, std::string&); |
|
53 |
3504
|
54 static int rename (const std::string&, const std::string&); |
|
55 static int rename (const std::string&, const std::string&, std::string&); |
1765
|
56 |
3504
|
57 static int rmdir (const std::string&); |
|
58 static int rmdir (const std::string&, std::string&); |
1765
|
59 |
5476
|
60 static int recursive_rmdir (const std::string&); |
|
61 static int recursive_rmdir (const std::string&, std::string&); |
|
62 |
5138
|
63 static std::string canonicalize_file_name (const std::string&); |
|
64 static std::string canonicalize_file_name (const std::string&, std::string&); |
|
65 |
3504
|
66 static std::string tempnam (const std::string&, const std::string&); |
3710
|
67 static std::string tempnam (const std::string&, const std::string&, |
|
68 std::string&); |
1765
|
69 |
3504
|
70 typedef std::string (*tilde_expansion_hook) (const std::string&); |
3040
|
71 |
|
72 static tilde_expansion_hook tilde_expansion_preexpansion_hook; |
|
73 |
|
74 static tilde_expansion_hook tilde_expansion_failure_hook; |
|
75 |
|
76 static string_vector tilde_additional_prefixes; |
|
77 |
|
78 static string_vector tilde_additional_suffixes; |
|
79 |
3504
|
80 static std::string tilde_expand (const std::string&); |
2926
|
81 static string_vector tilde_expand (const string_vector&); |
1778
|
82 |
2926
|
83 static int umask (mode_t); |
2668
|
84 |
3504
|
85 static int unlink (const std::string&); |
|
86 static int unlink (const std::string&, std::string&); |
4097
|
87 |
|
88 static bool is_dir_sep (char); |
4101
|
89 |
|
90 static char dir_sep_char; |
|
91 static std::string dir_sep_str; |
|
92 static std::string dir_sep_chars; |
2926
|
93 }; |
1765
|
94 |
|
95 #endif |
|
96 |
|
97 /* |
|
98 ;;; Local Variables: *** |
|
99 ;;; mode: C++ *** |
|
100 ;;; End: *** |
|
101 */ |