Skip to content

Commit

Permalink
File#deletable? -> File#removable?
Browse files Browse the repository at this point in the history
  • Loading branch information
Sija committed Dec 23, 2023
1 parent 8611182 commit bb8787a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/list_files.cr
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ def visit(folder, level = 0)
type = info.type || "-"
mtime = info.mtime.try(&.to_s("%Y-%m-%d %H:%M:%S")) || "-"

if info.readable? || info.deletable?
if info.readable? || info.removable?
flags = String.build do |str|
str << '['
str << 'R' if info.readable?
str << 'W' if info.deletable?
str << 'W' if info.removable?
str << ']'
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/gphoto2/camera_file_info/file.cr
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ module GPhoto2
field?(:permissions) && wrapped.permissions.read?
end

def deletable?
def removable?
field?(:permissions) && wrapped.permissions.delete?
end

Expand Down

0 comments on commit bb8787a

Please sign in to comment.