summaryrefslogtreecommitdiff
path: root/libs/taglib/tests/utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'libs/taglib/tests/utils.h')
-rw-r--r--libs/taglib/tests/utils.h25
1 files changed, 0 insertions, 25 deletions
diff --git a/libs/taglib/tests/utils.h b/libs/taglib/tests/utils.h
deleted file mode 100644
index 21d94526f0..0000000000
--- a/libs/taglib/tests/utils.h
+++ /dev/null
@@ -1,25 +0,0 @@
-#include <string>
-#include <stdio.h>
-#include <sys/fcntl.h>
-
-using namespace std;
-
-inline string copyFile(const string &filename, const string &ext)
-{
- string newname = string(tempnam(NULL, NULL)) + ext;
- string oldname = string("data/") + filename + ext;
- char buffer[4096];
- int bytes;
- int inf = open(oldname.c_str(), O_RDONLY);
- int outf = open(newname.c_str(), O_CREAT | O_EXCL | O_RDWR, S_IRUSR | S_IWUSR);
- while((bytes = read(inf, buffer, sizeof(buffer))) > 0)
- write(outf, buffer, bytes);
- close(outf);
- close(inf);
- return newname;
-}
-
-inline void deleteFile(const string &filename)
-{
- remove(filename.c_str());
-}