Class: Thunderbird::LocalFolderPlaceholder
- Inherits:
-
Object
- Object
- Thunderbird::LocalFolderPlaceholder
- Defined in:
- lib/thunderbird/local_folder_placeholder.rb
Overview
Each subdirectory is “accompanied” by a blank file of the same name (without the ‘.sbd’ extension)
Instance Attribute Summary collapse
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #ensure_initialized ⇒ Object
- #exists? ⇒ Boolean
-
#initialize(path) ⇒ LocalFolderPlaceholder
constructor
A new instance of LocalFolderPlaceholder.
- #is_regular? ⇒ Boolean
Constructor Details
#initialize(path) ⇒ LocalFolderPlaceholder
Returns a new instance of LocalFolderPlaceholder.
6 7 8 |
# File 'lib/thunderbird/local_folder_placeholder.rb', line 6 def initialize(path) @path = path end |
Instance Attribute Details
#path ⇒ Object (readonly)
Returns the value of attribute path.
4 5 6 |
# File 'lib/thunderbird/local_folder_placeholder.rb', line 4 def path @path end |
Instance Method Details
#ensure_initialized ⇒ Object
18 19 20 |
# File 'lib/thunderbird/local_folder_placeholder.rb', line 18 def ensure_initialized FileUtils.touch path end |
#exists? ⇒ Boolean
10 11 12 |
# File 'lib/thunderbird/local_folder_placeholder.rb', line 10 def exists? File.exists?(path) end |
#is_regular? ⇒ Boolean
14 15 16 |
# File 'lib/thunderbird/local_folder_placeholder.rb', line 14 def is_regular? File.file?(path) end |