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 |
|
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
|
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 |
|
35 file_ops |
1765
|
36 { |
3504
|
37 static int mkdir (const std::string&, mode_t); |
|
38 static int mkdir (const std::string&, mode_t, std::string&); |
1765
|
39 |
3504
|
40 static int mkfifo (const std::string&, mode_t); |
|
41 static int mkfifo (const std::string&, mode_t, std::string&); |
1765
|
42 |
3710
|
43 static int link (const std::string&, const std::string&); |
|
44 static int link (const std::string&, const std::string&, std::string&); |
|
45 |
|
46 static int symlink (const std::string&, const std::string&); |
|
47 static int symlink (const std::string&, const std::string&, std::string&); |
|
48 |
|
49 static int readlink (const std::string&, std::string&); |
|
50 static int readlink (const std::string&, std::string&, std::string&); |
|
51 |
3504
|
52 static int rename (const std::string&, const std::string&); |
|
53 static int rename (const std::string&, const std::string&, std::string&); |
1765
|
54 |
3504
|
55 static int rmdir (const std::string&); |
|
56 static int rmdir (const std::string&, std::string&); |
1765
|
57 |
5138
|
58 static std::string canonicalize_file_name (const std::string&); |
|
59 static std::string canonicalize_file_name (const std::string&, std::string&); |
|
60 |
3504
|
61 static std::string tempnam (const std::string&, const std::string&); |
3710
|
62 static std::string tempnam (const std::string&, const std::string&, |
|
63 std::string&); |
1765
|
64 |
3504
|
65 typedef std::string (*tilde_expansion_hook) (const std::string&); |
3040
|
66 |
|
67 static tilde_expansion_hook tilde_expansion_preexpansion_hook; |
|
68 |
|
69 static tilde_expansion_hook tilde_expansion_failure_hook; |
|
70 |
|
71 static string_vector tilde_additional_prefixes; |
|
72 |
|
73 static string_vector tilde_additional_suffixes; |
|
74 |
3504
|
75 static std::string tilde_expand (const std::string&); |
2926
|
76 static string_vector tilde_expand (const string_vector&); |
1778
|
77 |
2926
|
78 static int umask (mode_t); |
2668
|
79 |
3504
|
80 static int unlink (const std::string&); |
|
81 static int unlink (const std::string&, std::string&); |
4097
|
82 |
|
83 static bool is_dir_sep (char); |
4101
|
84 |
|
85 static char dir_sep_char; |
|
86 static std::string dir_sep_str; |
|
87 static std::string dir_sep_chars; |
2926
|
88 }; |
1765
|
89 |
|
90 #endif |
|
91 |
|
92 /* |
|
93 ;;; Local Variables: *** |
|
94 ;;; mode: C++ *** |
|
95 ;;; End: *** |
|
96 */ |