@@ -73,7 +73,7 @@ class PAIMON_EXPORT InputStream : public Stream {
7373 // / @return Result containing the actual number of bytes read on success, or an error status on
7474 // / failure.
7575 // / @note The stream position advances by the number of bytes actually read.
76- virtual Result<int32_t > Read (char * buffer, uint32_t size) = 0;
76+ virtual Result<int64_t > Read (char * buffer, int64_t size) = 0;
7777
7878 // / Read data from given position in the stream.
7979 // /
@@ -83,7 +83,7 @@ class PAIMON_EXPORT InputStream : public Stream {
8383 // / @param[out] buffer The buffer to store the read content.
8484 // / @param size The number of bytes to read.
8585 // / @param offset The position in the stream to read from.
86- virtual Result<int32_t > Read (char * buffer, uint32_t size, uint64_t offset) = 0;
86+ virtual Result<int64_t > Read (char * buffer, int64_t size, int64_t offset) = 0;
8787
8888 // / Asynchronously read data from the input stream.
8989 // /
@@ -98,7 +98,7 @@ class PAIMON_EXPORT InputStream : public Stream {
9898 // / @param callback The callback function to be invoked upon completion of the read operation.
9999 // / The callback will receive a Status object indicating the success or failure
100100 // / of the read operation.
101- virtual void ReadAsync (char * buffer, uint32_t size, uint64_t offset,
101+ virtual void ReadAsync (char * buffer, int64_t size, int64_t offset,
102102 std::function<void (Status)>&& callback) = 0;
103103
104104 // / Get an identifier that uniquely identify the underlying content.
@@ -107,7 +107,7 @@ class PAIMON_EXPORT InputStream : public Stream {
107107 virtual Result<std::string> GetUri () const = 0;
108108
109109 // / Get the total length of the file in bytes.
110- virtual Result<uint64_t > Length () const = 0;
110+ virtual Result<int64_t > Length () const = 0;
111111};
112112
113113// / Abstract class for output stream operations.
@@ -121,7 +121,7 @@ class PAIMON_EXPORT OutputStream : public Stream {
121121 // / @return Result containing the actual number of bytes written on success, or an error status
122122 // / on failure.
123123 // / @note The stream position advances by the number of bytes actually written.
124- virtual Result<int32_t > Write (const char * buffer, uint32_t size) = 0;
124+ virtual Result<int64_t > Write (const char * buffer, int64_t size) = 0;
125125
126126 // / Flush pending data to the disk.
127127 virtual Status Flush () = 0;
@@ -160,7 +160,7 @@ class PAIMON_EXPORT FileStatus {
160160
161161 // / Get the size of the file in bytes.
162162 // / @note For directories, this method is undefined behavior.
163- virtual uint64_t GetLen () const = 0;
163+ virtual int64_t GetLen () const = 0;
164164
165165 // / Check if this entry represents a directory.
166166 virtual bool IsDir () const = 0;
0 commit comments