Remove unused function

This commit is contained in:
Eelco Dolstra 2014-02-26 18:48:32 +01:00
parent d58ceae022
commit 509993e598
2 changed files with 0 additions and 32 deletions

View file

@ -281,34 +281,6 @@ void writeLine(int fd, string s)
} }
static void _computePathSize(const Path & path,
unsigned long long & bytes, unsigned long long & blocks)
{
checkInterrupt();
struct stat st = lstat(path);
bytes += st.st_size;
blocks += st.st_blocks;
if (S_ISDIR(st.st_mode)) {
Strings names = readDirectory(path);
for (Strings::iterator i = names.begin(); i != names.end(); ++i)
_computePathSize(path + "/" + *i, bytes, blocks);
}
}
void computePathSize(const Path & path,
unsigned long long & bytes, unsigned long long & blocks)
{
bytes = 0;
blocks = 0;
_computePathSize(path, bytes, blocks);
}
static void _deletePath(const Path & path, unsigned long long & bytesFreed) static void _deletePath(const Path & path, unsigned long long & bytesFreed)
{ {
checkInterrupt(); checkInterrupt();

View file

@ -78,10 +78,6 @@ string readLine(int fd);
/* Write a line to a file descriptor. */ /* Write a line to a file descriptor. */
void writeLine(int fd, string s); void writeLine(int fd, string s);
/* Compute the sum of the sizes of all files in `path'. */
void computePathSize(const Path & path,
unsigned long long & bytes, unsigned long long & blocks);
/* Delete a path; i.e., in the case of a directory, it is deleted /* Delete a path; i.e., in the case of a directory, it is deleted
recursively. Don't use this at home, kids. The second variant recursively. Don't use this at home, kids. The second variant
returns the number of bytes and blocks freed. */ returns the number of bytes and blocks freed. */