mirror of
https://github.com/hkalexling/Mango.git
synced 2025-08-03 11:25:29 -04:00
Rename Entry.exists? to Entry.examine
This commit is contained in:
parent
caf4cfb6cd
commit
9f6be70995
@ -228,7 +228,7 @@ abstract class Entry
|
|||||||
|
|
||||||
abstract def page_dimensions
|
abstract def page_dimensions
|
||||||
|
|
||||||
abstract def exists? : Bool?
|
abstract def examine : Bool?
|
||||||
end
|
end
|
||||||
|
|
||||||
class ZippedEntry < Entry
|
class ZippedEntry < Entry
|
||||||
@ -337,7 +337,7 @@ class ZippedEntry < Entry
|
|||||||
sizes
|
sizes
|
||||||
end
|
end
|
||||||
|
|
||||||
def exists? : Bool
|
def examine : Bool
|
||||||
File.exists? @zip_path
|
File.exists? @zip_path
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -439,7 +439,7 @@ class DirectoryEntry < Entry
|
|||||||
sizes
|
sizes
|
||||||
end
|
end
|
||||||
|
|
||||||
def exists? : Bool
|
def examine : Bool
|
||||||
existence = File.exists? @dir_path
|
existence = File.exists? @dir_path
|
||||||
return false unless existence
|
return false unless existence
|
||||||
files = DirectoryEntry.get_valid_files @dir_path
|
files = DirectoryEntry.get_valid_files @dir_path
|
||||||
@ -447,9 +447,8 @@ class DirectoryEntry < Entry
|
|||||||
existence = files.size > 0 && @signature == signature
|
existence = files.size > 0 && @signature == signature
|
||||||
@sorted_files = nil unless existence
|
@sorted_files = nil unless existence
|
||||||
|
|
||||||
# For more efficient,
|
# For more efficient, update a directory entry with new property
|
||||||
# Fix a directory instance with new property
|
# and return true like Title.examine
|
||||||
# and return true
|
|
||||||
existence
|
existence
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -132,7 +132,7 @@ class Title
|
|||||||
|
|
||||||
previous_entries_size = @entries.size
|
previous_entries_size = @entries.size
|
||||||
@entries.select! do |entry|
|
@entries.select! do |entry|
|
||||||
existence = entry.exists?
|
existence = entry.examine
|
||||||
Fiber.yield
|
Fiber.yield
|
||||||
context["deleted_entry_ids"] << entry.id unless existence
|
context["deleted_entry_ids"] << entry.id unless existence
|
||||||
existence
|
existence
|
||||||
|
Loading…
x
Reference in New Issue
Block a user