diff options
author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
---|---|---|
committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2017-06-27 06:07:23 +0000 |
commit | 1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch) | |
tree | 46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/platform/FileStream.h | |
parent | 32761a6cee1d0dee366b885b7b9c777e67885688 (diff) | |
download | WebKitGtk-tarball-master.tar.gz |
webkitgtk-2.16.5HEADwebkitgtk-2.16.5master
Diffstat (limited to 'Source/WebCore/platform/FileStream.h')
-rw-r--r-- | Source/WebCore/platform/FileStream.h | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/Source/WebCore/platform/FileStream.h b/Source/WebCore/platform/FileStream.h index eeeaa0ea7..d421e4f3b 100644 --- a/Source/WebCore/platform/FileStream.h +++ b/Source/WebCore/platform/FileStream.h @@ -31,32 +31,18 @@ #ifndef FileStream_h #define FileStream_h -#if ENABLE(BLOB) - #include "FileSystem.h" -#include <wtf/Forward.h> -#include <wtf/PassRefPtr.h> -#include <wtf/RefCounted.h> namespace WebCore { class URL; // All methods are synchronous. -class FileStream : public RefCounted<FileStream> { +class FileStream { public: - static PassRefPtr<FileStream> create() - { - return adoptRef(new FileStream()); - } + FileStream(); ~FileStream(); - // FIXME: To be removed when we switch to using BlobData. - void start(); - - // Aborts the operation. - void stop(); - // Gets the size of a file. Also validates if the file has been changed or not if the expected modification time is provided, i.e. non-zero. // Returns total number of bytes if successful. -1 otherwise. long long getSize(const String& path, double expectedModificationTime); @@ -65,10 +51,6 @@ public: // Returns true on success. False otherwise. bool openForRead(const String& path, long long offset, long long length); - // Opens a file for writing. - // Returns true on success. False otherwise. - bool openForWrite(const String& path); - // Closes the file. void close(); @@ -77,17 +59,7 @@ public: // If 0 is returned, it means that the reading is completed. int read(char* buffer, int length); - // Writes a blob to the file. - // Returns number of bytes being written on success. -1 otherwise. - int write(const URL& blobURL, long long position, int length); - - // Truncates the file to the specified position. - // Returns true on success. False otherwise. - bool truncate(long long position); - private: - FileStream(); - PlatformFileHandle m_handle; long long m_bytesProcessed; long long m_totalBytesToRead; @@ -95,6 +67,4 @@ private: } // namespace WebCore -#endif // ENABLE(BLOB) - #endif // FileStream_h |