From 8ce4327bc0d3f2695b936391c856cc80de6c0d83 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:50:57 +0000 Subject: More progress updates Author: jgg Date: 1998-08-26 04:52:23 GMT More progress updates --- apt-pkg/contrib/fileutl.cc | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'apt-pkg/contrib/fileutl.cc') diff --git a/apt-pkg/contrib/fileutl.cc b/apt-pkg/contrib/fileutl.cc index b29b2e098..d18f7853e 100644 --- a/apt-pkg/contrib/fileutl.cc +++ b/apt-pkg/contrib/fileutl.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: fileutl.cc,v 1.6 1998/07/19 04:42:12 jgg Exp $ +// $Id: fileutl.cc,v 1.7 1998/08/26 04:52:26 jgg Exp $ /* ###################################################################### File Utilities @@ -107,6 +107,18 @@ string SafeGetCWD() return S; } /*}}}*/ +// flNotDir - Strip the directory from the filename /*{{{*/ +// --------------------------------------------------------------------- +/* */ +string flNotDir(string File) +{ + string::size_type Res = File.rfind('/'); + if (Res == string::npos) + return File; + Res++; + return string(File,Res,Res - File.length()); +} + /*}}}*/ // FileFd::FileFd - Open a file /*{{{*/ // --------------------------------------------------------------------- -- cgit v1.2.3-70-g09d2