Skip to content

Commit e1c2168

Browse files
authored
Add Path#relative? (#16473)
1 parent f6a1c53 commit e1c2168

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/path.cr

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1364,6 +1364,13 @@ struct Path
13641364
end
13651365
end
13661366

1367+
# Returns `true` if this path is relative.
1368+
#
1369+
# See `#absolute?`
1370+
def relative? : Bool
1371+
!absolute?
1372+
end
1373+
13671374
# :nodoc:
13681375
def separators
13691376
Path.separators(@kind)

0 commit comments

Comments
 (0)