mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-06-26 10:54:26 +02:00
FS: Removed unused ::read method
This commit is contained in:
parent
411c735d4e
commit
67c28b7015
2 changed files with 0 additions and 20 deletions
19
src/FS.cpp
19
src/FS.cpp
|
@ -629,25 +629,6 @@ bool File::create (const std::string& name, int mode /* = 0640 */)
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
|
||||||
std::string File::read (const std::string& name)
|
|
||||||
{
|
|
||||||
std::string contents = "";
|
|
||||||
|
|
||||||
std::ifstream in (name.c_str ());
|
|
||||||
if (in.good ())
|
|
||||||
{
|
|
||||||
std::string line;
|
|
||||||
line.reserve (1024);
|
|
||||||
while (getline (in, line))
|
|
||||||
contents += line + "\n";
|
|
||||||
|
|
||||||
in.close ();
|
|
||||||
}
|
|
||||||
|
|
||||||
return contents;
|
|
||||||
}
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
bool File::read (const std::string& name, std::string& contents)
|
bool File::read (const std::string& name, std::string& contents)
|
||||||
{
|
{
|
||||||
|
|
1
src/FS.h
1
src/FS.h
|
@ -104,7 +104,6 @@ public:
|
||||||
virtual time_t btime () const;
|
virtual time_t btime () const;
|
||||||
|
|
||||||
static bool create (const std::string&, int mode = 0640);
|
static bool create (const std::string&, int mode = 0640);
|
||||||
static std::string read (const std::string&);
|
|
||||||
static bool read (const std::string&, std::string&);
|
static bool read (const std::string&, std::string&);
|
||||||
static bool read (const std::string&, std::vector <std::string>&);
|
static bool read (const std::string&, std::vector <std::string>&);
|
||||||
static bool write (const std::string&, const std::string&);
|
static bool write (const std::string&, const std::string&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue