comparison liboctave/file-stat.cc @ 5476:941f0fc6b596

[project @ 2005-09-29 22:46:07 by jwe]
author jwe
date Thu, 29 Sep 2005 22:49:43 +0000
parents 4c8a2e4e0717
children ace8d8d26933
comparison
equal deleted inserted replaced
5475:04fa51cb7e90 5476:941f0fc6b596
51 // initialized, they should throw an exception. 51 // initialized, they should throw an exception.
52 52
53 bool 53 bool
54 file_stat::is_blk (void) const 54 file_stat::is_blk (void) const
55 { 55 {
56 return is_blk (fs_mode);
57 }
58
59 bool
60 file_stat::is_chr (void) const
61 {
62 return is_chr (fs_mode);
63 }
64
65 bool
66 file_stat::is_dir (void) const
67 {
68 return is_dir (fs_mode);
69 }
70
71 bool
72 file_stat::is_fifo (void) const
73 {
74 return is_fifo (fs_mode);
75 }
76
77 bool
78 file_stat::is_lnk (void) const
79 {
80 return is_lnk (fs_mode);
81 }
82
83 bool
84 file_stat::is_reg (void) const
85 {
86 return is_reg (fs_mode);
87 }
88
89 bool
90 file_stat::is_sock (void) const
91 {
92 return is_sock (fs_mode);
93 }
94
95 bool
96 file_stat::is_blk (mode_t mode)
97 {
56 #ifdef S_ISBLK 98 #ifdef S_ISBLK
57 return S_ISBLK (fs_mode); 99 return S_ISBLK (mode);
58 #else 100 #else
59 return false; 101 return false;
60 #endif 102 #endif
61 } 103 }
62 104
63 bool 105 bool
64 file_stat::is_chr (void) const 106 file_stat::is_chr (mode_t mode)
65 { 107 {
66 #ifdef S_ISCHR 108 #ifdef S_ISCHR
67 return S_ISCHR (fs_mode); 109 return S_ISCHR (mode);
68 #else 110 #else
69 return false; 111 return false;
70 #endif 112 #endif
71 } 113 }
72 114
73 bool 115 bool
74 file_stat::is_dir (void) const 116 file_stat::is_dir (mode_t mode)
75 { 117 {
76 #ifdef S_ISDIR 118 #ifdef S_ISDIR
77 return S_ISDIR (fs_mode); 119 return S_ISDIR (mode);
78 #else 120 #else
79 return false; 121 return false;
80 #endif 122 #endif
81 } 123 }
82 124
83 bool 125 bool
84 file_stat::is_fifo (void) const 126 file_stat::is_fifo (mode_t mode)
85 { 127 {
86 #ifdef S_ISFIFO 128 #ifdef S_ISFIFO
87 return S_ISFIFO (fs_mode); 129 return S_ISFIFO (mode);
88 #else 130 #else
89 return false; 131 return false;
90 #endif 132 #endif
91 } 133 }
92 134
93 bool 135 bool
94 file_stat::is_lnk (void) const 136 file_stat::is_lnk (mode_t mode)
95 { 137 {
96 #ifdef S_ISLNK 138 #ifdef S_ISLNK
97 return S_ISLNK (fs_mode); 139 return S_ISLNK (mode);
98 #else 140 #else
99 return false; 141 return false;
100 #endif 142 #endif
101 } 143 }
102 144
103 bool 145 bool
104 file_stat::is_reg (void) const 146 file_stat::is_reg (mode_t mode)
105 { 147 {
106 #ifdef S_ISREG 148 #ifdef S_ISREG
107 return S_ISREG (fs_mode); 149 return S_ISREG (mode);
108 #else 150 #else
109 return false; 151 return false;
110 #endif 152 #endif
111 } 153 }
112 154
113 bool 155 bool
114 file_stat::is_sock (void) const 156 file_stat::is_sock (mode_t mode)
115 { 157 {
116 #ifdef S_ISSOCK 158 #ifdef S_ISSOCK
117 return S_ISSOCK (fs_mode); 159 return S_ISSOCK (mode);
118 #else 160 #else
119 return false; 161 return false;
120 #endif 162 #endif
121 } 163 }
122 164