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.
140
141
142
|
# File 'lib/recls/ximpl/windows.rb', line 140
def attributes
@attributes
end
|
Returns the value of attribute by_handle_information.
142
143
144
|
# File 'lib/recls/ximpl/windows.rb', line 142
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.
143
144
145
|
# File 'lib/recls/ximpl/windows.rb', line 143
def short_path
@short_path
end
|
Instance Method Details
#archive? ⇒ Boolean
157
158
159
160
|
# File 'lib/recls/ximpl/windows.rb', line 157
def archive?
has_attribute_? FILE_ATTRIBUTE_ARCHIVE
end
|
#compressed? ⇒ Boolean
177
178
179
180
|
# File 'lib/recls/ximpl/windows.rb', line 177
def compressed?
has_attribute_? FILE_ATTRIBUTE_COMPRESSED
end
|
#device? ⇒ Boolean
162
163
164
165
|
# File 'lib/recls/ximpl/windows.rb', line 162
def device?
has_attribute_? FILE_ATTRIBUTE_DEVICE
end
|
#encrypted? ⇒ Boolean
182
183
184
185
|
# File 'lib/recls/ximpl/windows.rb', line 182
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
167
168
169
170
|
# File 'lib/recls/ximpl/windows.rb', line 167
def normal?
has_attribute_? FILE_ATTRIBUTE_NORMAL
end
|
#system? ⇒ Boolean
Windows-specific attributes
152
153
154
155
|
# File 'lib/recls/ximpl/windows.rb', line 152
def system?
has_attribute_? FILE_ATTRIBUTE_SYSTEM
end
|
#temporary? ⇒ Boolean
172
173
174
175
|
# File 'lib/recls/ximpl/windows.rb', line 172
def temporary?
has_attribute_? FILE_ATTRIBUTE_TEMPORARY
end
|