From bb23ced4f1cc6627d21aa29691976d0e560411e0 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Wed, 21 Dec 2005 00:40:00 +0000 Subject: [PATCH] (is_absolute): new method. --- flower/file-name.cc | 6 ++++++ flower/include/file-name.hh | 1 + 2 files changed, 7 insertions(+) diff --git a/flower/file-name.cc b/flower/file-name.cc index 7eb7267d55..3f5318678f 100644 --- a/flower/file-name.cc +++ b/flower/file-name.cc @@ -116,3 +116,9 @@ File_name::File_name (String file_name) else base_ = file_name; } + +bool +File_name::is_absolute () const +{ + return (dir_[0] == DIRSEP); +} diff --git a/flower/include/file-name.hh b/flower/include/file-name.hh index 68ba6d8f46..748ff52737 100644 --- a/flower/include/file-name.hh +++ b/flower/include/file-name.hh @@ -22,6 +22,7 @@ public: File_name (String); + bool is_absolute () const; String to_string () const; }; -- 2.39.5