[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: KStdDirs
From: Waldo Bastian <bastian () ens ! ascom ! ch>
Date: 1999-07-23 9:33:29
[Download RAW message or body]
I can add a
findAllResourcesRelative()
function to KStdDirs which returns a list of unique relative paths
With a tree like
$HOME/.kde/share/foo/bar/file1.txt
$KDEDIR/share/foo/bar/file1.txt
$KDEDIR/share/foo/bar/file2.txt
$KDEDIR/share/foo/bor/file1.txt
Assume that "foobar" points to ".../share/foo".
Currently (at least last week) findAllResources("foobar", "bar/*") returns
$HOME/.kde/share/foo/bar/file1.txt
$KDEDIR/share/foo/bar/file1.txt
$KDEDIR/share/foo/bar/file2.txt
findAllResourcesRelative("foobar", "bar/*") should return in this case:
bar/file1.txt
bar/file2.txt
You can then use locateLocal("foobar", relativeFile) to get the full path.
The disadvantage is that we do a stat() to much for each file in this case...
An other option would be to have:
findAllResourcesRelative("foobar", "bar/*") which returns:
{ bar/file1.txt, $HOME/.kde/share/foo/bar/file1.txt }
{ bar/file2.txt, $KDEDIR/share/foo/bar/file2.txt }
E.g. both the relative as well as the absolute path. You don't have to
do a locateLocal() any more then.
Cheers,
Waldo
--
The "gui" in "Penguin" is pronounced "K-D-E"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic