|
Boost-Commit : |
From: technews_at_[hidden]
Date: 2008-07-29 10:06:02
Author: turkanis
Date: 2008-07-29 10:06:01 EDT (Tue, 29 Jul 2008)
New Revision: 47866
URL: http://svn.boost.org/trac/boost/changeset/47866
Log:
removed functions relating to file timestamps (addresses #2154)
Removed:
trunk/boost/iostreams/detail/file_times.hpp
Text files modified:
trunk/boost/iostreams/device/file_descriptor.hpp | 14 -------------
trunk/boost/iostreams/device/mapped_file.hpp | 16 --------------
trunk/libs/iostreams/build/Jamfile.v2 | 2
trunk/libs/iostreams/src/file_descriptor.cpp | 28 --------------------------
trunk/libs/iostreams/src/mapped_file.cpp | 43 ----------------------------------------
trunk/libs/iostreams/test/Jamfile.v2 | 11 ++-------
6 files changed, 4 insertions(+), 110 deletions(-)
Deleted: trunk/boost/iostreams/detail/file_times.hpp
==============================================================================
--- trunk/boost/iostreams/detail/file_times.hpp 2008-07-29 10:06:01 EDT (Tue, 29 Jul 2008)
+++ (empty file)
@@ -1,43 +0,0 @@
-/*
- * 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.
- *
- * File: boost/iostreams/detail/file_times.hpp
- * Date: Sun Jun 22 14:23:12 MDT 2008
- * Copyright: Jorge Lodos and 2008 CodeRage, LLC
- * Author: Jorge Lodos and Jonathan Turkanis
- * Contact: turkanis at coderage dot com
- *
- * Declares functions for accessing and manipulating timestamps associated
- * with a file descriptor.
- */
-
-#ifndef BOOST_IOSTREAMS_DETAIL_FILE_TIMES_HPP_INCLUDED
-#define BOOST_IOSTREAMS_DETAIL_FILE_TIMES_HPP_INCLUDED
-
-#include <ctime>
-#include <boost/iostreams/detail/file_handle.hpp>
-
-namespace boost { namespace iostreams { namespace detail {
-
-// Returns the last access time of the file associated with the given handle.
-// Reports errors by throwing instances of std::failure.
-std::time_t last_read_time(file_handle);
-
-// Sets the last access time of the file associated with the given handle.
-// Reports errors by throwing instances of std::failure.
-void set_last_read_time(file_handle, std::time_t);
-
-// Returns the last modification time of the file associated with the given
-// handle. Reports errors by throwing instances of std::failure.
-std::time_t last_write_time(file_handle);
-
-// Sets the last modification time of the file associated with the given
-// handle. Reports errors by throwing instances of std::failure.
-void set_last_write_time(file_handle, std::time_t);
-
-} } } // End namespaces detail, iostreams, boost.
-
-#endif // #ifndef BOOST_IOSTREAMS_DETAIL_FILE_TIMES_HPP_INCLUDED
Modified: trunk/boost/iostreams/device/file_descriptor.hpp
==============================================================================
--- trunk/boost/iostreams/device/file_descriptor.hpp (original)
+++ trunk/boost/iostreams/device/file_descriptor.hpp 2008-07-29 10:06:01 EDT (Tue, 29 Jul 2008)
@@ -15,7 +15,6 @@
# pragma once
#endif
-#include <ctime>
#include <string>
#include <boost/cstdint.hpp> // intmax_t.
#include <boost/iostreams/categories.hpp> // tags.
@@ -23,7 +22,6 @@
#include <boost/iostreams/detail/config/dyn_link.hpp>
#include <boost/iostreams/detail/config/windows_posix.hpp>
#include <boost/iostreams/detail/file_handle.hpp>
-#include <boost/iostreams/detail/file_times.hpp>
#include <boost/iostreams/detail/ios.hpp> // openmode, seekdir, int types.
#include <boost/iostreams/detail/path.hpp>
#include <boost/iostreams/positioning.hpp>
@@ -111,10 +109,6 @@
std::streamsize write(const char_type* s, std::streamsize n);
std::streampos seek(stream_offset off, BOOST_IOS::seekdir way);
handle_type handle() const;
- std::time_t last_read_time() const;
- void set_last_read_time(std::time_t) const;
- std::time_t last_write_time() const;
- void set_last_write_time(std::time_t) const;
private:
void init();
@@ -145,10 +139,6 @@
using file_descriptor::read;
using file_descriptor::seek;
using file_descriptor::handle;
- using file_descriptor::last_read_time;
- using file_descriptor::set_last_read_time;
- using file_descriptor::last_write_time;
- using file_descriptor::set_last_write_time;
// Default constructor
file_descriptor_source() { }
@@ -215,10 +205,6 @@
using file_descriptor::write;
using file_descriptor::seek;
using file_descriptor::handle;
- using file_descriptor::last_read_time;
- using file_descriptor::set_last_read_time;
- using file_descriptor::last_write_time;
- using file_descriptor::set_last_write_time;
// Default constructor
file_descriptor_sink() { }
Modified: trunk/boost/iostreams/device/mapped_file.hpp
==============================================================================
--- trunk/boost/iostreams/device/mapped_file.hpp (original)
+++ trunk/boost/iostreams/device/mapped_file.hpp 2008-07-29 10:06:01 EDT (Tue, 29 Jul 2008)
@@ -10,7 +10,6 @@
#include <boost/config.hpp> // make sure size_t is in std.
#include <cstddef> // size_t.
-#include <ctime> // size_t.
#include <string> // pathnames.
#include <utility> // pair.
#include <boost/config.hpp> // BOOST_MSVC.
@@ -202,13 +201,6 @@
iterator begin() const;
iterator end() const;
- //--------------File access and modification times------------------------//
-
- std::time_t last_read_time() const;
- void set_last_read_time(std::time_t) const;
- std::time_t last_write_time() const;
- void set_last_write_time(std::time_t) const;
-
//--------------Query admissible offsets----------------------------------//
// Returns the allocation granularity for virtual memory. Values passed
@@ -321,10 +313,6 @@
//--------------File access----------------------------------------------//
void resize(stream_offset new_size);
- std::time_t last_read_time() const;
- void set_last_read_time(std::time_t) const;
- std::time_t last_write_time() const;
- void set_last_write_time(std::time_t) const;
private:
delegate_type delegate_;
};
@@ -358,10 +346,6 @@
using mapped_file::end;
using mapped_file::alignment;
using mapped_file::resize;
- using mapped_file::last_read_time;
- using mapped_file::set_last_read_time;
- using mapped_file::last_write_time;
- using mapped_file::set_last_write_time;
// Default constructor
mapped_file_sink() { }
Modified: trunk/libs/iostreams/build/Jamfile.v2
==============================================================================
--- trunk/libs/iostreams/build/Jamfile.v2 (original)
+++ trunk/libs/iostreams/build/Jamfile.v2 2008-07-29 10:06:01 EDT (Tue, 29 Jul 2008)
@@ -115,7 +115,7 @@
}
-local sources = file_descriptor.cpp mapped_file.cpp file_times.cpp ;
+local sources = file_descriptor.cpp mapped_file.cpp ;
local z = [ create-library zlib : zll z : adler32 compress
crc32 deflate gzio infback inffast inflate inftrees trees uncompr zutil :
<link>shared:<define>ZLIB_DLL ] ;
Modified: trunk/libs/iostreams/src/file_descriptor.cpp
==============================================================================
--- trunk/libs/iostreams/src/file_descriptor.cpp (original)
+++ trunk/libs/iostreams/src/file_descriptor.cpp 2008-07-29 10:06:01 EDT (Tue, 29 Jul 2008)
@@ -59,10 +59,6 @@
std::streamsize read(char* s, std::streamsize n);
std::streamsize write(const char* s, std::streamsize n);
std::streampos seek(stream_offset off, BOOST_IOS::seekdir way);
- std::time_t last_read_time() const;
- void set_last_read_time(std::time_t) const;
- std::time_t last_write_time() const;
- void set_last_write_time(std::time_t) const;
static file_handle invalid_handle();
enum flags {
close_on_exit = 1,
@@ -297,18 +293,6 @@
#endif // #ifdef BOOST_IOSTREAMS_WINDOWS
}
-std::time_t file_descriptor_impl::last_read_time() const
-{ return detail::last_read_time(handle_); }
-
-void file_descriptor_impl::set_last_read_time(std::time_t tm) const
-{ detail::set_last_read_time(handle_, tm); }
-
-std::time_t file_descriptor_impl::last_write_time() const
-{ return detail::last_write_time(handle_); }
-
-void file_descriptor_impl::set_last_write_time(std::time_t tm) const
-{ detail::set_last_write_time(handle_, tm); }
-
// Returns the value stored in a file_handle variable when no file is open
file_handle file_descriptor_impl::invalid_handle()
{
@@ -382,18 +366,6 @@
detail::file_handle file_descriptor::handle() const { return pimpl_->handle_; }
-std::time_t file_descriptor::last_read_time() const
-{ return pimpl_->last_read_time(); }
-
-void file_descriptor::set_last_read_time(std::time_t tm) const
-{ pimpl_->set_last_read_time(tm); }
-
-std::time_t file_descriptor::last_write_time() const
-{ return pimpl_->last_write_time(); }
-
-void file_descriptor::set_last_write_time(std::time_t tm) const
-{ pimpl_->set_last_write_time(tm); }
-
void file_descriptor::init() { pimpl_.reset(new impl_type); }
void file_descriptor::open(
Modified: trunk/libs/iostreams/src/mapped_file.cpp
==============================================================================
--- trunk/libs/iostreams/src/mapped_file.cpp (original)
+++ trunk/libs/iostreams/src/mapped_file.cpp 2008-07-29 10:06:01 EDT (Tue, 29 Jul 2008)
@@ -12,14 +12,12 @@
#include <boost/iostreams/detail/config/rtl.hpp>
#include <boost/iostreams/detail/config/windows_posix.hpp>
#include <boost/iostreams/detail/file_handle.hpp>
-#include <boost/iostreams/detail/file_times.hpp>
#include <boost/iostreams/detail/system_failure.hpp>
#include <boost/iostreams/device/mapped_file.hpp>
#ifdef BOOST_IOSTREAMS_WINDOWS
# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
# include <windows.h>
-# include <time.h>
#else
# include <errno.h>
# include <fcntl.h>
@@ -58,10 +56,6 @@
std::size_t size() const { return size_; }
char* data() const { return data_; }
void resize(stream_offset new_size);
- std::time_t last_read_time() const;
- void set_last_read_time(std::time_t) const;
- std::time_t last_write_time() const;
- void set_last_write_time(std::time_t) const;
static int alignment();
private:
void open_file(param_type p);
@@ -147,18 +141,6 @@
params_ = p;
}
-std::time_t mapped_file_impl::last_read_time() const
-{ return detail::last_read_time(handle_); }
-
-void mapped_file_impl::set_last_read_time(std::time_t tm) const
-{ detail::set_last_read_time(handle_, tm); }
-
-std::time_t mapped_file_impl::last_write_time() const
-{ return detail::last_write_time(handle_); }
-
-void mapped_file_impl::set_last_write_time(std::time_t tm) const
-{ detail::set_last_write_time(handle_, tm); }
-
int mapped_file_impl::alignment()
{
#ifdef BOOST_IOSTREAMS_WINDOWS
@@ -469,19 +451,6 @@
const char* mapped_file_source::begin() const { return data(); }
const char* mapped_file_source::end() const { return data() + size(); }
-
-std::time_t mapped_file_source::last_read_time() const
-{ return pimpl_->last_read_time(); }
-
-void mapped_file_source::set_last_read_time(std::time_t tm) const
-{ pimpl_->set_last_read_time(tm); }
-
-std::time_t mapped_file_source::last_write_time() const
-{ return pimpl_->last_write_time(); }
-
-void mapped_file_source::set_last_write_time(std::time_t tm) const
-{ pimpl_->set_last_write_time(tm); }
-
int mapped_file_source::alignment()
{ return detail::mapped_file_impl::alignment(); }
@@ -499,18 +468,6 @@
void mapped_file::resize(stream_offset new_size)
{ delegate_.pimpl_->resize(new_size); }
-std::time_t mapped_file::last_read_time() const
-{ return delegate_.pimpl_->last_read_time(); }
-
-void mapped_file::set_last_read_time(std::time_t tm) const
-{ delegate_.pimpl_->set_last_read_time(tm); }
-
-std::time_t mapped_file::last_write_time() const
-{ return delegate_.pimpl_->last_write_time(); }
-
-void mapped_file::set_last_write_time(std::time_t tm) const
-{ delegate_.pimpl_->set_last_write_time(tm); }
-
//------------------Implementation of mapped_file_sink------------------------//
mapped_file_sink::mapped_file_sink(const mapped_file_sink& other)
Modified: trunk/libs/iostreams/test/Jamfile.v2
==============================================================================
--- trunk/libs/iostreams/test/Jamfile.v2 (original)
+++ trunk/libs/iostreams/test/Jamfile.v2 2008-07-29 10:06:01 EDT (Tue, 29 Jul 2008)
@@ -40,8 +40,7 @@
[ test-iostreams close_test.cpp ]
[ test-iostreams
code_converter_test.cpp
- detail/utf8_codecvt_facet.cpp
- ../src/file_times.cpp : <link>static ]
+ detail/utf8_codecvt_facet.cpp : <link>static ]
[ test-iostreams combine_test.cpp ]
[ test-iostreams compose_test.cpp ]
[ test-iostreams component_access_test.cpp ]
@@ -52,8 +51,7 @@
[ test-iostreams execute_test.cpp ]
[ test-iostreams file_test.cpp ]
[ test-iostreams file_descriptor_test.cpp
- ../src/file_descriptor.cpp
- ../src/file_times.cpp : <link>static ]
+ ../src/file_descriptor.cpp : <link>static ]
[ test-iostreams filtering_stream_test.cpp ]
[ test-iostreams finite_state_filter_test.cpp ]
[ test-iostreams flush_test.cpp ]
@@ -63,8 +61,7 @@
[ test-iostreams invert_test.cpp ]
[ test-iostreams line_filter_test.cpp ]
[ test-iostreams mapped_file_test.cpp
- ../src/mapped_file.cpp
- ../src/file_times.cpp : <link>static ]
+ ../src/mapped_file.cpp : <link>static ]
[ test-iostreams newline_test.cpp ]
[ test-iostreams null_test.cpp ]
[ test-iostreams operation_sequence_test.cpp ]
@@ -93,7 +90,6 @@
large_file_test.cpp
../src/file_descriptor.cpp
../src/mapped_file.cpp
- ../src/file_times.cpp
: <define>LARGE_FILE_KEEP=$(LARGE_FILE_KEEP)
<link>static ] ;
}
@@ -104,7 +100,6 @@
large_file_test.cpp
../src/file_descriptor.cpp
../src/mapped_file.cpp
- ../src/file_times.cpp
: <define>LARGE_FILE_TEMP=$(LARGE_FILE_TEMP)
<link>static ] ;
}
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk