Hello,
This is kind of an odd question, but I wasn't able to find an answer after digging through the documentation.
How do I verify that a file_accessor is actually valid on the disk (i.e., the _uid still points to an existing file)? Right now, if you try to access an attribute (say, .size) on a file_accessor that is no longer valid, Dragonfly raises an error. While this probably won't happen often in practice, my application would still like to handle such cases gracefully.
Is there something like a file.exists? method? Right now I have a hacky way of determining this but I don't like it:
def has_file?
begin
!file.nil? && file.size
rescue
false
end
end
Thanks!