123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- {
- $Id$
- This file is part of the Free Pascal run time library.
- Copyright (c) 2002 by Marco van de Voort
- Some generic overloads for stringfunctions in the unix unit.
- See the file COPYING.FPC, included in this distribution,
- for details about the copyright.
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
- **********************************************************************}
- Function StatFS(Path:ansistring;Var Info:Tstatfs):cint;
- {
- Get all information on a fileSystem, and return it in Info.
- Path is the name of a file/directory on the fileSystem you wish to
- investigate.
- }
-
- begin
- statfs:=statfs(pchar(path),info);
- end;
- Function fpReadLink(Name:ansistring):ansistring;
- {
- Read a link (where it points to)
- }
- var
- LinkName : ansistring;
- i : cint;
- begin
- SetLength(linkname,PATH_MAX);
- i:=fpReadLink(pchar(name),pchar(linkname),PATH_MAX);
- if i>0 then
- begin
- SetLength(linkname,i);
- fpReadLink:=LinkName;
- end
- else
- fpReadLink:='';
- end;
- {
- $Log$
- Revision 1.3 2004-11-03 15:00:43 marco
- * Pathstr eliminated
- Revision 1.2 2004/01/01 16:10:23 marco
- * fpreadlink(pathstr) moved to unxovl (since not platform specific),
- small fixes for "make all OPT='-dFPC_USE_LIBC'
- Revision 1.1 2003/12/30 12:27:44 marco
- * FPC_USE_LIBC
- }
|