ucommon  7.0.0
About: GNU uCommon C++ is a portable and optimized class framework for writing C++ applications that need to use threads and support concurrent synchronization, and that use sockets, XML parsing, object serialization, thread-optimized string and data structure classes, etc..
  Fossies Dox: ucommon-7.0.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

Loading...
Searching...
No Matches
mdsum.cpp File Reference
#include <ucommon/secure.h>
#include <sys/stat.h>
Include dependency graph for mdsum.cpp:

Go to the source code of this file.

Functions

static void result (const char *path, int code)
 
static void digest (const char *path=NULL)
 
static void scan (String path, bool top=true)
 
int main (int argc, char **argv)
 

Variables

static shell::flagopt helpflag ('h',"--help", _TEXT("display this list"))
 
static shell::flagopt althelp ('?', NULL, NULL)
 
static shell::stringopt hash ('d', "--digest", _TEXT("digest method (md5)"), "method", "md5")
 
static shell::flagopt recursive ('R', "--recursive", _TEXT("recursive directory scan"))
 
static shell::flagopt altrecursive ('r', NULL, NULL)
 
static shell::flagopt hidden ('s', "--hidden", _TEXT("show hidden files"))
 
static int exit_code = 0
 
static const char * argv0 = "md"
 
static digest_t md
 

Function Documentation

◆ digest()

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 163 of file mdsum.cpp.

References ucommon::_TEXT(), althelp, ucommon::shell::argv0(), argv0, ucommon::shell::bind(), digest(), ucommon::shell::errexit(), exit_code, ucommon::Digest::has(), hash, ucommon::shell::help(), helpflag, ucommon::secure::init(), ucommon::is(), ucommon::fsys::is_dir(), md, scan(), and ucommon::str().

Here is the call graph for this function:

◆ result()

static void result ( const char *  path,
int  code 
)
static

Definition at line 35 of file mdsum.cpp.

References ucommon::_TEXT(), argv0, ucommon::shell::errexit(), exit_code, md, and ucommon::shell::printf().

Referenced by ucommon::mapref< K, V >::at(), ucommon::byteref< R >::b64(), ucommon::fsys::copy(), ucommon::ArrayRef::count(), digest(), ost::SysTime::getGMTTime(), ost::SysTime::getLocalTime(), ost::SysTime::gmtime(), ucommon::byteref< R >::hex(), ost::Process::join(), ost::SysTime::locatime(), ucommon::RecursiveMutex::lock(), ucommon::sstream::open(), ucommon::Date::operator+(), ucommon::Time::operator+(), ucommon::DateTime::operator+(), ucommon::Barrier::operator++(), ucommon::Date::operator-(), ucommon::Time::operator-(), ucommon::DateTime::operator-(), ucommon::Barrier::operator--(), ost::Serial::operator=(), ucommon::shell::path(), ucommon::shell::printf(), ucommon::stringref< R >::promote(), ucommon::byteref< R >::promote(), ucommon::ObjectPager::pull(), ucommon::StringPager::pull(), ucommon::Socket::query(), ucommon::temporary< uint8_t * >::read(), ucommon::Socket::readfrom(), ucommon::Socket::readline(), ucommon::ArrayRef::Array::remove(), ucommon::String::replace(), ucommon::utf8::rfind(), scan(), ucommon::String::search(), ucommon::sstream::sstream(), ucommon::JoinableThread::start(), ost::Thread::start(), ucommon::mapref< K, V >::take(), ucommon::String::token(), ucommon::StringPager::token(), ucommon::Barrier::wait(), ucommon::Semaphore::wait(), ucommon::TimedEvent::wait(), ost::Conditional::wait(), ucommon::temporary< uint8_t * >::write(), and ucommon::Socket::writeto().

Here is the call graph for this function:

◆ scan()

static void scan ( String  path,
bool  top = true 
)
static

Definition at line 138 of file mdsum.cpp.

References altrecursive, digest(), hidden, ucommon::is(), ucommon::fsys::is_dir(), ucommon::dir::read(), recursive, result(), scan(), and ucommon::str().

Referenced by main(), and scan().

Here is the call graph for this function:

Variable Documentation

◆ althelp

shell::flagopt althelp('?', NULL, NULL) ( '?'  ,
NULL  ,
NULL   
)
static

Referenced by main().

◆ altrecursive

shell::flagopt altrecursive( 'r', NULL, NULL) ( 'r'  ,
NULL  ,
NULL   
)
static

Referenced by scan().

◆ argv0

const char* argv0 = "md"
static

Definition at line 32 of file mdsum.cpp.

Referenced by main(), and result().

◆ exit_code

int exit_code = 0
static

Definition at line 31 of file mdsum.cpp.

Referenced by main(), and result().

◆ hash

shell::stringopt hash( 'd', "--digest", _TEXT("digest method (md5)"), "method", "md5") ( 'd'  ,
"--digest"  ,
_TEXT("digest method (md5)")  ,
"method"  ,
"md5"   
)
static

Referenced by main().

◆ helpflag

shell::flagopt helpflag( 'h',"--help", _TEXT("display this list")) ( 'h'  ,
"--help"  ,
_TEXT("display this list")   
)
static

Referenced by main().

◆ hidden

shell::flagopt hidden( 's', "--hidden", _TEXT("show hidden files")) ( 's'  ,
"--hidden"  ,
_TEXT("show hidden files")   
)
static

Referenced by scan().

◆ md

digest_t md
static

Definition at line 33 of file mdsum.cpp.

Referenced by digest(), main(), result(), and ucommon::Digest::uuid().

◆ recursive

shell::flagopt recursive( 'R', "--recursive", _TEXT("recursive directory scan")) ( 'R'  ,
"--recursive"  ,
_TEXT("recursive directory scan")   
)
static

Referenced by scan().