summaryrefslogtreecommitdiffstats
path: root/src/libktorrent/util/fileops.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libktorrent/util/fileops.h')
-rw-r--r--src/libktorrent/util/fileops.h38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/libktorrent/util/fileops.h b/src/libktorrent/util/fileops.h
index d1c3437..592ecd3 100644
--- a/src/libktorrent/util/fileops.h
+++ b/src/libktorrent/util/fileops.h
@@ -25,6 +25,8 @@
#endif
#include <util/constants.h>
+#include <libktorrent_export.h>
+
class TQString;
namespace bt
@@ -37,7 +39,7 @@ namespace bt
* @param nothrow wether or not we shouldn't throw an Error upon failure
* @throw Error upon error
*/
- void MakeDir(const TQString & dir,bool nothrow = false);
+ LIBKTORRENT_EXPORT void MakeDir(const TQString & dir,bool nothrow = false);
/**
* Create a symbolic link @a link_url which links to @a link_to
@@ -45,7 +47,7 @@ namespace bt
* @param link_url The link url
* @param nothrow wether or not we shouldn't throw an Error upon failure
*/
- void SymLink(const TQString & link_to,const TQString & link_url,bool nothrow = false);
+ LIBKTORRENT_EXPORT void SymLink(const TQString & link_to,const TQString & link_url,bool nothrow = false);
/**
* Move a file/dir from one location to another
@@ -53,7 +55,7 @@ namespace bt
* @param dst The destination file / directory
* @param nothrow wether or not we shouldn't throw an Error upon failure
*/
- void Move(const TQString & src,const TQString & dst,bool nothrow = false);
+ LIBKTORRENT_EXPORT void Move(const TQString & src,const TQString & dst,bool nothrow = false);
/**
* Copy a file.
@@ -61,7 +63,7 @@ namespace bt
* @param dst The destination dir/file
* @param nothrow wether or not we shouldn't throw an Error upon failure
*/
- void CopyFile(const TQString & src,const TQString & dst,bool nothrow = false);
+ LIBKTORRENT_EXPORT void CopyFile(const TQString & src,const TQString & dst,bool nothrow = false);
/**
* Copy a file or directory
@@ -69,21 +71,21 @@ namespace bt
* @param dst The destination dir/file
* @param nothrow wether or not we shouldn't throw an Error upon failure
*/
- void CopyDir(const TQString & src,const TQString & dst,bool nothrow = false);
+ LIBKTORRENT_EXPORT void CopyDir(const TQString & src,const TQString & dst,bool nothrow = false);
/**
* Check wether a file/dir exists
* @param url The file/dir
* @return true if it exits
*/
- bool Exists(const TQString & url);
+ LIBKTORRENT_EXPORT bool Exists(const TQString & url);
/**
* Delete a file or directory.
* @param url The url of the file/dir
* @param nothrow wether or not we shouldn't throw an Error upon failure
*/
- void Delete(const TQString & url,bool nothrow = false);
+ LIBKTORRENT_EXPORT void Delete(const TQString & url,bool nothrow = false);
/**
* Try to create a file. Doesn't do anything if the file
@@ -91,7 +93,7 @@ namespace bt
* @param url The url of the file
* @param nothrow wether or not we shouldn't throw an Error upon failure
*/
- void Touch(const TQString & url,bool nothrow = false);
+ LIBKTORRENT_EXPORT void Touch(const TQString & url,bool nothrow = false);
/**
* Calculates the size of a file
@@ -99,7 +101,7 @@ namespace bt
* @return The size of the file
* @throw Error if the file doesn't exist, or something else goes wrong
*/
- Uint64 FileSize(const TQString & url);
+ LIBKTORRENT_EXPORT Uint64 FileSize(const TQString & url);
/**
* Get the size of a file.
@@ -107,7 +109,7 @@ namespace bt
* @return The size
* @throw Error if the file doesn't exist, or something else goes wrong
*/
- Uint64 FileSize(int fd);
+ LIBKTORRENT_EXPORT Uint64 FileSize(int fd);
/**
* Truncate a file (wrapper around ftruncate)
@@ -115,7 +117,7 @@ namespace bt
* @param size The size to truncate to
* @throw Error if the file doesn't exist, or something else goes wrong
*/
- void TruncateFile(int fd,Uint64 size,bool quick);
+ LIBKTORRENT_EXPORT void TruncateFile(int fd,Uint64 size,bool quick);
/**
* Truncate a file (wrapper around ftruncate)
@@ -124,28 +126,28 @@ namespace bt
* @param quick Use the quick way (doesn't prevent fragmentationt)
* @throw Error if the file doesn't exist, or something else goes wrong
*/
- void TruncateFile(const TQString & path,Uint64 size);
+ LIBKTORRENT_EXPORT void TruncateFile(const TQString & path,Uint64 size);
/**
* Special truncate for FAT file systems.
*/
- bool FatPreallocate(int fd,Uint64 size);
+ LIBKTORRENT_EXPORT bool FatPreallocate(int fd,Uint64 size);
/**
* Special truncate for FAT file systems.
*/
- bool FatPreallocate(const TQString & path,Uint64 size);
+ LIBKTORRENT_EXPORT bool FatPreallocate(const TQString & path,Uint64 size);
#ifdef HAVE_XFS_XFS_H
/**
* Special truncate for XFS file systems.
*/
- bool XfsPreallocate(int fd,Uint64 size);
+ LIBKTORRENT_EXPORT bool XfsPreallocate(int fd,Uint64 size);
/**
* Special truncate for XFS file systems.
*/
- bool XfsPreallocate(const TQString & path,Uint64 size);
+ LIBKTORRENT_EXPORT bool XfsPreallocate(const TQString & path,Uint64 size);
#endif
@@ -156,10 +158,10 @@ namespace bt
* @param whence Position to seek from
* @throw Error if something else goes wrong
*/
- void SeekFile(int fd,Int64 off,int whence);
+ LIBKTORRENT_EXPORT void SeekFile(int fd,Int64 off,int whence);
/// Calculate the number of bytes free on the filesystem path is located
- bool FreeDiskSpace(const TQString & path,Uint64 & bytes_free);
+ LIBKTORRENT_EXPORT bool FreeDiskSpace(const TQString & path,Uint64 & bytes_free);
}
#endif