2 #include "zipios++/zipios-config.h"
9 #include "zipios++/filepath.h"
15 const char FilePath::_separator = '/' ;
18 FilePath::FilePath( const string &path, bool check_exists )
21 pruneTrailingSeparator() ;
27 void FilePath::check() const {
38 if ( stat( _path.c_str(), &buf ) != -1 ) {
40 #if defined(BOOST_WINNT)
41 _is_reg = _S_IFREG & buf.st_mode ;
42 _is_dir = _S_IFDIR & buf.st_mode ;
43 _is_char = _S_IFCHR & buf.st_mode ;
45 _is_reg = S_ISREG ( buf.st_mode ) ;
46 _is_dir = S_ISDIR ( buf.st_mode ) ;
47 _is_char = S_ISCHR ( buf.st_mode ) ;
48 _is_block = S_ISBLK ( buf.st_mode ) ;
49 _is_socket = S_ISSOCK( buf.st_mode ) ;
50 _is_fifo = S_ISFIFO( buf.st_mode ) ;
58 Implementation of FilePath.
62 Zipios++ - a small C++ library that provides easy access to .zip files.
63 Copyright (C) 2000 Thomas Søndergaard
65 This library is free software; you can redistribute it and/or
66 modify it under the terms of the GNU Lesser General Public
67 License as published by the Free Software Foundation; either
68 version 2 of the License, or (at your option) any later version.
70 This library is distributed in the hope that it will be useful,
71 but WITHOUT ANY WARRANTY; without even the implied warranty of
72 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
73 Lesser General Public License for more details.
75 You should have received a copy of the GNU Lesser General Public
76 License along with this library; if not, write to the Free Software
77 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA