mirror of
https://github.com/s3fs-fuse/s3fs-fuse.git
synced 2024-11-16 01:07:11 +00:00
1597dfe659
- fixed a bug in the file cache, it was attempting to set the mtime on symlinks - general code cleanup; moved some string functions to string_util.cpp git-svn-id: http://s3fs.googlecode.com/svn/trunk@345 df820570-a93a-0410-bd06-b72b767a4274
38 lines
884 B
C++
38 lines
884 B
C++
#ifndef S3FS_STRING_UTIL_H_
|
|
#define S3FS_STRING_UTIL_H_
|
|
|
|
/*
|
|
* A collection of string utilities for manipulating URLs and HTTP responses.
|
|
*/
|
|
#include <string.h>
|
|
#include <syslog.h>
|
|
|
|
#include <string>
|
|
#include <sstream>
|
|
|
|
#define SPACES " \t\r\n"
|
|
|
|
template<typename T> std::string str(T value) {
|
|
std::stringstream s;
|
|
s << value;
|
|
return s.str();
|
|
}
|
|
|
|
extern bool debug;
|
|
extern bool foreground;
|
|
extern bool service_validated;
|
|
|
|
extern std::string bucket;
|
|
|
|
std::string trim_left(const std::string &s, const std::string &t = SPACES);
|
|
std::string trim_right(const std::string &s, const std::string &t = SPACES);
|
|
std::string trim(const std::string &s, const std::string &t = SPACES);
|
|
std::string lower(std::string s);
|
|
std::string IntToStr(int);
|
|
std::string get_date();
|
|
std::string urlEncode(const std::string &s);
|
|
std::string prepare_url(const char* url);
|
|
|
|
|
|
#endif // S3FS_STRING_UTIL_H_
|