Class: Recls::Ximpl::FileStat
- Inherits:
-
File::Stat
- Object
- File::Stat
- Recls::Ximpl::FileStat
show all
- Defined in:
- lib/recls/ximpl/unix.rb,
lib/recls/ximpl/windows.rb
Defined Under Namespace
Classes: ByHandleInformation
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
139
140
141
|
# File 'lib/recls/ximpl/windows.rb', line 139
def attributes
@attributes
end
|
Returns the value of attribute by_handle_information.
141
142
143
|
# File 'lib/recls/ximpl/windows.rb', line 141
def by_handle_information
@by_handle_information
end
|
#path ⇒ Object
Returns the value of attribute path.
56
57
58
|
# File 'lib/recls/ximpl/unix.rb', line 56
def path
@path
end
|
#short_path ⇒ Object
Returns the value of attribute short_path.
142
143
144
|
# File 'lib/recls/ximpl/windows.rb', line 142
def short_path
@short_path
end
|
Instance Method Details
#archive? ⇒ Boolean
156
157
158
159
|
# File 'lib/recls/ximpl/windows.rb', line 156
def archive?
has_attribute_? FILE_ATTRIBUTE_ARCHIVE
end
|
#compressed? ⇒ Boolean
176
177
178
179
|
# File 'lib/recls/ximpl/windows.rb', line 176
def compressed?
has_attribute_? FILE_ATTRIBUTE_COMPRESSED
end
|
#device? ⇒ Boolean
161
162
163
164
|
# File 'lib/recls/ximpl/windows.rb', line 161
def device?
has_attribute_? FILE_ATTRIBUTE_DEVICE
end
|
#encrypted? ⇒ Boolean
181
182
183
184
|
# File 'lib/recls/ximpl/windows.rb', line 181
def encrypted?
has_attribute_? FILE_ATTRIBUTE_ENCRYPTED
end
|
#hidden? ⇒ Boolean
58
59
60
61
62
63
64
65
66
67
68
|
# File 'lib/recls/ximpl/unix.rb', line 58
def hidden?
basename = File.basename @path
return false if basename.empty?
return false if '.' == basename
return false if '..' == basename
return false if ?. != basename[0]
return true
end
|
#normal? ⇒ Boolean
166
167
168
169
|
# File 'lib/recls/ximpl/windows.rb', line 166
def normal?
has_attribute_? FILE_ATTRIBUTE_NORMAL
end
|
#system? ⇒ Boolean
Windows-specific attributes
151
152
153
154
|
# File 'lib/recls/ximpl/windows.rb', line 151
def system?
has_attribute_? FILE_ATTRIBUTE_SYSTEM
end
|
#temporary? ⇒ Boolean
171
172
173
174
|
# File 'lib/recls/ximpl/windows.rb', line 171
def temporary?
has_attribute_? FILE_ATTRIBUTE_TEMPORARY
end
|