Page 1 of 1

Linux Lib: findpath_lib; find files and running processes

Posted: Fri Feb 16, 2007 3:29 pm
by walker
This small lib has 3 commands (one of them are obsolete as PB now works as expected)

1. find_lib(lib.s) - obsolete but maybe usefull to get the path of a lib searches a lib.so
Returns: full path (i.e. /usr/lib/libgtk-2.so) (only one!!! file is returned.....)

2. find_file (file.s, start.s, nosearch.s) - find files containing the string file.s starting in directory start.s and excluding directories containing string in nosearch. All directories from start.s on are searched recursively
Returns: a #LF$ separated list of files with full path (be carefull with "/" as starting directory :wink: )

3. find_proc(proc.s) finds running processes containing the string in proc.s
Returns: a #LF$ separated list with all matching processes
(If proc.s is empty, all processes are returned)

here is the downloadlink: http://home.arcor.de/x-linux/pure/findpath_lib

copy the file to ../purebasic/purelibraries/userlibraries/

May this commands are usefull for someone :D
The lib should work on all Distros.. if not, please let me know

UPDATED to work with PB Linux 4.10

Posted: Fri Feb 16, 2007 6:32 pm
by dracflamloc
Glad to see you're working in linux a lot walker. What kind of apps are you creating?

Posted: Fri Feb 16, 2007 7:49 pm
by walker
some small Win-apps in the past (all contracting work)...
and at present on a bigger project for myself (started on PB3.94... ) which I will hopefully finish the next 2-3 month (approx >20000 LOC at present) as I cannot work the whole day on it due to the state of my health

This one (started some month ago but stopped due to some restrictions of PB3.94) will be available on Linux and Windows too (it will be a commercial application) and maybe on MacOs.. but as I didn't own a mac yet... who knows :wink: I will announce it here if time has come.... meanwhile I'll release all functions I develop for my project, if I think they could be usefull for other...