DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
True Drop Box
FTP/SFTP Hosting
Group Account
Team Anywhere
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Cloud-to-Cloud Backup
|
DVR/Camera Backup
FTP, Email & Web Service
FTP/SFTP Hosting
|
Email Hosting
|
Web Hosting
|
Webcam Hosting
Other Products & Services
Team Anywhere
|
Connect to Remote PC
|
Cloud Surveillance
|
Virtual CCTV NVR
Quick Links
Security and Privacy
Customer Support
Service Manual
Use Cases
Group Account
Online Help
Support Forum
Contact Us
About DriveHQ
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
Other Features
Team Anywhere (Remote Desktop Service)
CameraFTP Cloud Surveillance
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Team Anywhere for Windows (Beta)
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
// (C) Copyright 2008 CodeRage, LLC (turkanis at coderage dot com) // (C) Copyright 2003-2007 Jonathan Turkanis // Distributed under the Boost Software License, Version 1.0. (See accompanying // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt.) // See http://www.boost.org/libs/iostreams for documentation. // // Contains wrappers for standard file buffers, together // with convenience typedefs: // - basic_file_source // - basic_file_sink // - basic_file // #ifndef BOOST_IOSTREAMS_FILE_HPP_INCLUDED #define BOOST_IOSTREAMS_FILE_HPP_INCLUDED #if defined(_MSC_VER) && (_MSC_VER >= 1020) # pragma once #endif #include
#ifndef BOOST_IOSTREAMS_NO_LOCALE # include
#endif #include
// pathnames, char_traits. #include
#include
// openmode, seekdir, int types. #include
#include
// seek. #include
// Must come last. #include
// MSVC. namespace boost { namespace iostreams { template
class basic_file { public: typedef Ch char_type; struct category : public seekable_device_tag, public closable_tag, public localizable_tag { }; basic_file( const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::in | BOOST_IOS::out, BOOST_IOS::openmode base_mode = BOOST_IOS::in | BOOST_IOS::out ); std::streamsize read(char_type* s, std::streamsize n); std::streamsize write(const char_type* s, std::streamsize n); std::streampos seek( stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode which = BOOST_IOS::in | BOOST_IOS::out ); void open( const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::in | BOOST_IOS::out, BOOST_IOS::openmode base_mode = BOOST_IOS::in | BOOST_IOS::out ); bool is_open() const; void close(); #ifndef BOOST_IOSTREAMS_NO_LOCALE void imbue(const std::locale& loc) { pimpl_->file_.pubimbue(loc); } #endif private: struct impl { impl(const std::string& path, BOOST_IOS::openmode mode) { file_.open(path.c_str(), mode); } ~impl() { if (file_.is_open()) file_.close(); } BOOST_IOSTREAMS_BASIC_FILEBUF(Ch) file_; }; shared_ptr
pimpl_; }; typedef basic_file
file; typedef basic_file
wfile; template
struct basic_file_source : private basic_file
{ typedef Ch char_type; struct category : input_seekable, device_tag, closable_tag { }; using basic_file
::read; using basic_file
::seek; using basic_file
::is_open; using basic_file
::close; basic_file_source( const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::in ) : basic_file
(path, mode & ~BOOST_IOS::out, BOOST_IOS::in) { } void open( const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::in ) { basic_file
::open(path, mode & ~BOOST_IOS::out, BOOST_IOS::in); } }; typedef basic_file_source
file_source; typedef basic_file_source
wfile_source; template
struct basic_file_sink : private basic_file
{ typedef Ch char_type; struct category : output_seekable, device_tag, closable_tag { }; using basic_file
::write; using basic_file
::seek; using basic_file
::is_open; using basic_file
::close; basic_file_sink( const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::out ) : basic_file
(path, mode & ~BOOST_IOS::in, BOOST_IOS::out) { } void open( const std::string& path, BOOST_IOS::openmode mode = BOOST_IOS::out ) { basic_file
::open(path, mode & ~BOOST_IOS::in, BOOST_IOS::out); } }; typedef basic_file_sink
file_sink; typedef basic_file_sink
wfile_sink; //------------------Implementation of basic_file------------------------------// template
basic_file
::basic_file ( const std::string& path, BOOST_IOS::openmode mode, BOOST_IOS::openmode base_mode ) { open(path, mode, base_mode); } template
inline std::streamsize basic_file
::read (char_type* s, std::streamsize n) { std::streamsize result = pimpl_->file_.sgetn(s, n); return result != 0 ? result : -1; } template
inline std::streamsize basic_file
::write (const char_type* s, std::streamsize n) { return pimpl_->file_.sputn(s, n); } template
std::streampos basic_file
::seek ( stream_offset off, BOOST_IOS::seekdir way, BOOST_IOS::openmode ) { return iostreams::seek(pimpl_->file_, off, way); } template
void basic_file
::open ( const std::string& path, BOOST_IOS::openmode mode, BOOST_IOS::openmode base_mode ) { pimpl_.reset(new impl(path, mode | base_mode)); } template
bool basic_file
::is_open() const { return pimpl_->file_.is_open(); } template
void basic_file
::close() { pimpl_->file_.close(); } //----------------------------------------------------------------------------// } } // End namespaces iostreams, boost. #include
// MSVC #endif // #ifndef BOOST_IOSTREAMS_FILE_HPP_INCLUDED
file.hpp
Page URL
File URL
Prev
3/6
Next
Download
( 5 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.