1765
|
1 /* |
|
2 |
7017
|
3 Copyright (C) 1996, 1997, 2000, 2002, 2005, 2006, 2007 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 |
|
23 #if !defined (octave_file_ops_h) |
|
24 #define octave_file_ops_h 1 |
|
25 |
|
26 #include <string> |
|
27 |
2283
|
28 #ifdef HAVE_SYS_TYPES_H |
|
29 #include <sys/types.h> |
|
30 #endif |
|
31 |
3040
|
32 #include "str-vec.h" |
|
33 |
2926
|
34 struct |
6108
|
35 OCTAVE_API |
2926
|
36 file_ops |
1765
|
37 { |
3504
|
38 static int mkdir (const std::string&, mode_t); |
|
39 static int mkdir (const std::string&, mode_t, std::string&); |
1765
|
40 |
3504
|
41 static int mkfifo (const std::string&, mode_t); |
|
42 static int mkfifo (const std::string&, mode_t, std::string&); |
1765
|
43 |
3710
|
44 static int link (const std::string&, const std::string&); |
|
45 static int link (const std::string&, const std::string&, std::string&); |
|
46 |
|
47 static int symlink (const std::string&, const std::string&); |
|
48 static int symlink (const std::string&, const std::string&, std::string&); |
|
49 |
|
50 static int readlink (const std::string&, std::string&); |
|
51 static int readlink (const std::string&, std::string&, std::string&); |
|
52 |
3504
|
53 static int rename (const std::string&, const std::string&); |
|
54 static int rename (const std::string&, const std::string&, std::string&); |
1765
|
55 |
3504
|
56 static int rmdir (const std::string&); |
|
57 static int rmdir (const std::string&, std::string&); |
1765
|
58 |
5476
|
59 static int recursive_rmdir (const std::string&); |
|
60 static int recursive_rmdir (const std::string&, std::string&); |
|
61 |
5138
|
62 static std::string canonicalize_file_name (const std::string&); |
|
63 static std::string canonicalize_file_name (const std::string&, std::string&); |
|
64 |
3504
|
65 static std::string tempnam (const std::string&, const std::string&); |
3710
|
66 static std::string tempnam (const std::string&, const std::string&, |
|
67 std::string&); |
1765
|
68 |
3504
|
69 typedef std::string (*tilde_expansion_hook) (const std::string&); |
3040
|
70 |
|
71 static tilde_expansion_hook tilde_expansion_preexpansion_hook; |
|
72 |
|
73 static tilde_expansion_hook tilde_expansion_failure_hook; |
|
74 |
|
75 static string_vector tilde_additional_prefixes; |
|
76 |
|
77 static string_vector tilde_additional_suffixes; |
|
78 |
3504
|
79 static std::string tilde_expand (const std::string&); |
2926
|
80 static string_vector tilde_expand (const string_vector&); |
1778
|
81 |
2926
|
82 static int umask (mode_t); |
2668
|
83 |
3504
|
84 static int unlink (const std::string&); |
|
85 static int unlink (const std::string&, std::string&); |
4097
|
86 |
|
87 static bool is_dir_sep (char); |
4101
|
88 |
|
89 static char dir_sep_char; |
|
90 static std::string dir_sep_str; |
|
91 static std::string dir_sep_chars; |
2926
|
92 }; |
1765
|
93 |
|
94 #endif |
|
95 |
|
96 /* |
|
97 ;;; Local Variables: *** |
|
98 ;;; mode: C++ *** |
|
99 ;;; End: *** |
|
100 */ |