summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/fileutl.cc
diff options
context:
space:
mode:
authorArch Librarian <arch@canonical.com>2004-09-20 16:50:57 +0000
committerArch Librarian <arch@canonical.com>2004-09-20 16:50:57 +0000
commit8ce4327bc0d3f2695b936391c856cc80de6c0d83 (patch)
tree1ba165575c80bb48909f56b2c1e875524c65ebab /apt-pkg/contrib/fileutl.cc
parent1a7c9eba99a9521a7722be37d6bafe5fa4936630 (diff)
More progress updates
Author: jgg Date: 1998-08-26 04:52:23 GMT More progress updates
Diffstat (limited to 'apt-pkg/contrib/fileutl.cc')
-rw-r--r--apt-pkg/contrib/fileutl.cc14
1 files changed, 13 insertions, 1 deletions
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 /*{{{*/
// ---------------------------------------------------------------------