We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent df9a01f commit 5d87006Copy full SHA for 5d87006
src/path/path.rs
@@ -373,6 +373,23 @@ impl Path {
373
.unwrap_or(false)
374
}
375
376
+ /// Returns `true` if the `Path` is relative, i.e., not absolute.
377
+ ///
378
+ /// See [`is_absolute`]'s documentation for more details.
379
380
+ /// # Examples
381
382
+ /// ```
383
+ /// use async_std::path::Path;
384
385
+ /// assert!(Path::new("foo.txt").is_relative());
386
387
388
+ /// [`is_absolute`]: #method.is_absolute
389
+ pub fn is_relative(&self) -> bool {
390
+ self.inner.is_relative()
391
+ }
392
+
393
/// Queries the file system to get information about a file, directory, etc.
394
///
395
/// This function will traverse symbolic links to query information about the
0 commit comments