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