summaryrefslogtreecommitdiffstats
path: root/scribus/util_file.h
diff options
context:
space:
mode:
authorcraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-01-01 11:40:09 +0000
committercraig <craig@11d20701-8431-0410-a711-e3c959e3b870>2012-01-01 11:40:09 +0000
commit7ed83b6c6666eb8b6b104c211ae7e52907350372 (patch)
tree4430b556abac0ad660a0aacf1887d77f85d8be02 /scribus/util_file.h
downloadscribus-7ed83b6c6666eb8b6b104c211ae7e52907350372.tar.gz
scribus-7ed83b6c6666eb8b6b104c211ae7e52907350372.tar.xz
scribus-7ed83b6c6666eb8b6b104c211ae7e52907350372.zip
Branch 1.3.5 tree to 1.4.x tree, goodbye 1.3.x
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17163 11d20701-8431-0410-a711-e3c959e3b870
Diffstat (limited to 'scribus/util_file.h')
-rw-r--r--scribus/util_file.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/scribus/util_file.h b/scribus/util_file.h
new file mode 100644
index 0000000..3e7a978
--- /dev/null
+++ b/scribus/util_file.h
@@ -0,0 +1,68 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+#ifndef _UTIL_FILE_H
+#define _UTIL_FILE_H
+
+#include "scribusapi.h"
+
+class QDataStream;
+class QString;
+class ScStreamFilter;
+
+/**
+* @brief Copy a source file to a target
+ *
+ * This function copy a file to a destination. If destination exists,
+ * the target file is overwritten.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @return true on success, false on failure.
+**/
+bool SCRIBUS_API copyFile(const QString& source, const QString& target);
+/**
+* @brief Copy a source file to a target using atomic operations
+ *
+ * This function copy a file to a destination using atomic operations.
+ * If destination exists, the target file is overwritten.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @return true on success, false on failure.
+**/
+bool SCRIBUS_API copyFileAtomic(const QString& source, const QString& target);
+/**
+* @brief Copy a source file to a stream filter
+ *
+ * This function copy a file to a stream filter. The target filter has
+ * to be opened before the function call.
+ *
+ * @param source the source file
+ * @param target the target filter
+ * @return true on success, false on failre.
+**/
+bool SCRIBUS_API copyFileToFilter(const QString& source, ScStreamFilter& target);
+/**
+* @brief Copy a source file to a data stream
+ * @param source the source file
+ * @param target the target stream
+ * @return true on success, false on failre.
+**/
+bool SCRIBUS_API copyFileToStream(const QString& source, QDataStream& target);
+/**
+* @brief Move a source file to a destination
+ *
+ * This function move a file to a destination. The source file is deleted
+ * when done.
+ *
+ * @param source the source file
+ * @param target the target file
+ * @return true on success, false on failre.
+**/
+bool SCRIBUS_API moveFile(const QString& source, const QString& target);
+
+#endif