Class: Thunderbird::LocalFolderPlaceholder

Inherits:
Object
  • Object
show all
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

Instance Method Summary collapse

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

#pathObject (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_initializedObject



18
19
20
# File 'lib/thunderbird/local_folder_placeholder.rb', line 18

def ensure_initialized
  FileUtils.touch path
end

#exists?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/thunderbird/local_folder_placeholder.rb', line 10

def exists?
  File.exists?(path)
end

#is_regular?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/thunderbird/local_folder_placeholder.rb', line 14

def is_regular?
  File.file?(path)
end