File_UNIX.h
Go to the documentation of this file.
00001 //
00002 // File_UNIX.h
00003 //
00004 // $Id: //poco/1.3/Foundation/include/Poco/File_UNIX.h#4 $
00005 //
00006 // Library: Foundation
00007 // Package: Filesystem
00008 // Module:  File
00009 //
00010 // Definition of the FileImpl class for Unix.
00011 //
00012 // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
00013 // and Contributors.
00014 //
00015 // Permission is hereby granted, free of charge, to any person or organization
00016 // obtaining a copy of the software and accompanying documentation covered by
00017 // this license (the "Software") to use, reproduce, display, distribute,
00018 // execute, and transmit the Software, and to prepare derivative works of the
00019 // Software, and to permit third-parties to whom the Software is furnished to
00020 // do so, all subject to the following:
00021 // 
00022 // The copyright notices in the Software and this entire statement, including
00023 // the above license grant, this restriction and the following disclaimer,
00024 // must be included in all copies of the Software, in whole or in part, and
00025 // all derivative works of the Software, unless such copies or derivative
00026 // works are solely in the form of machine-executable object code generated by
00027 // a source language processor.
00028 // 
00029 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00030 // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00031 // FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT
00032 // SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE
00033 // FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE,
00034 // ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
00035 // DEALINGS IN THE SOFTWARE.
00036 //
00037 
00038 
00039 #ifndef Foundation_File_UNIX_INCLUDED
00040 #define Foundation_File_UNIX_INCLUDED
00041 
00042 
00043 #include "Poco/Foundation.h"
00044 
00045 
00046 namespace Poco {
00047 
00048 
00049 class FileImpl
00050 {
00051 protected:
00052         typedef UInt64 FileSizeImpl;
00053 
00054         FileImpl();
00055         FileImpl(const std::string& path);
00056         virtual ~FileImpl();
00057         void swapImpl(FileImpl& file);
00058         void setPathImpl(const std::string& path);
00059         const std::string& getPathImpl() const;
00060         bool existsImpl() const;
00061         bool canReadImpl() const;
00062         bool canWriteImpl() const;
00063         bool canExecuteImpl() const;
00064         bool isFileImpl() const;
00065         bool isDirectoryImpl() const;
00066         bool isLinkImpl() const;
00067         bool isDeviceImpl() const;
00068         bool isHiddenImpl() const;
00069         Timestamp createdImpl() const;
00070         Timestamp getLastModifiedImpl() const;
00071         void setLastModifiedImpl(const Timestamp& ts);
00072         FileSizeImpl getSizeImpl() const;
00073         void setSizeImpl(FileSizeImpl size);
00074         void setWriteableImpl(bool flag = true);                
00075         void setExecutableImpl(bool flag = true);               
00076         void copyToImpl(const std::string& path) const;
00077         void renameToImpl(const std::string& path);
00078         void removeImpl();
00079         bool createFileImpl();
00080         bool createDirectoryImpl();
00081         static void handleLastErrorImpl(const std::string& path);
00082         
00083 private:
00084         std::string _path;
00085         
00086         friend class DirectoryIteratorImpl;
00087 };
00088 
00089 
00090 //
00091 // inlines
00092 //
00093 inline const std::string& FileImpl::getPathImpl() const
00094 {
00095         return _path;
00096 }
00097 
00098 
00099 } // namespace Poco
00100 
00101 
00102 #endif // Foundation_File_UNIX_INCLUDED


pluginlib
Author(s): Tully Foote and Eitan Marder-Eppstein
autogenerated on Sat Dec 28 2013 17:20:19