"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "lib/core/src/rcMisc.cpp" between
irods-4.2.5.tar.gz and irods-4.2.6.tar.gz

About: iRODS (the integrated Rule Oriented Data System) is a distributed data-management system for creating data grids, digital libraries, persistent archives, and real-time data systems.

rcMisc.cpp  (irods-4.2.5):rcMisc.cpp  (irods-4.2.6)
skipping to change at line 50 skipping to change at line 50
// =-=-=-=-=-=-=- // =-=-=-=-=-=-=-
// boost includes // boost includes
#include <boost/filesystem.hpp> #include <boost/filesystem.hpp>
#include <boost/lexical_cast.hpp> #include <boost/lexical_cast.hpp>
#include <boost/filesystem/operations.hpp> #include <boost/filesystem/operations.hpp>
#include <boost/filesystem/convenience.hpp> #include <boost/filesystem/convenience.hpp>
#include <boost/format.hpp> #include <boost/format.hpp>
#include <boost/generator_iterator.hpp> #include <boost/generator_iterator.hpp>
// TODO:THIS NEEDS TO BE GONE (Issue 3995)
//
// Replace this with:
// namespace fs = boost::filesystem;
// within the scope of functions and
// objects that need it.
using namespace boost::filesystem;
/* check with the input path is a valid path - /* check with the input path is a valid path -
* 1 - valid * 1 - valid
* 0 - not valid * 0 - not valid
*/ */
int int
isPath( char *myPath ) { isPath( char *myPath ) {
path p( myPath ); namespace fs = boost::filesystem;
fs::path p( myPath );
if ( exists( p ) ) { if ( exists( p ) ) {
return 1; return 1;
} }
else { else {
return 0; return 0;
} }
} }
rodsLong_t rodsLong_t
getFileSize( char *myPath ) { getFileSize( char *myPath ) {
path p( myPath ); namespace fs = boost::filesystem;
fs::path p( myPath );
if ( exists( p ) && is_regular_file( p ) ) { if ( exists( p ) && is_regular_file( p ) ) {
return file_size( p ); return file_size( p );
} }
else { else {
return -1; return -1;
} }
} }
int freeBBuf( bytesBuf_t *myBBuf ) { int freeBBuf( bytesBuf_t *myBBuf ) {
skipping to change at line 2541 skipping to change at line 2537
return 1; return 1;
} }
else { else {
/* /myZone/home/myName/... Not a trash home */ /* /myZone/home/myName/... Not a trash home */
return 0; return 0;
} }
} }
int int
openRestartFile( char * restartFile, rodsRestart_t * rodsRestart ) { openRestartFile( char * restartFile, rodsRestart_t * rodsRestart ) {
path p( restartFile ); namespace fs = boost::filesystem;
fs::path p( restartFile );
char buf[MAX_NAME_LEN * 3]; char buf[MAX_NAME_LEN * 3];
char *inptr; char *inptr;
char tmpStr[MAX_NAME_LEN]; char tmpStr[MAX_NAME_LEN];
int status; int status;
if ( !exists( p ) || file_size( p ) == 0 ) { if ( !exists( p ) || file_size( p ) == 0 ) {
#ifndef windows_platform #ifndef windows_platform
rodsRestart->fd = open( restartFile, O_RDWR | O_CREAT, 0644 ); rodsRestart->fd = open( restartFile, O_RDWR | O_CREAT, 0644 );
#else #else
rodsRestart->fd = iRODSNt_bopen( restartFile, O_RDWR | O_CREAT, 0644 ); rodsRestart->fd = iRODSNt_bopen( restartFile, O_RDWR | O_CREAT, 0644 );
 End of changes. 4 change blocks. 
11 lines changed or deleted 9 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)