|
@@ -102,6 +102,14 @@ String FileAccessWindowsPipe::get_path_absolute() const {
|
|
|
return path_src;
|
|
|
}
|
|
|
|
|
|
+uint64_t FileAccessWindowsPipe::get_length() const {
|
|
|
+ ERR_FAIL_COND_V_MSG(fd[0] == nullptr, -1, "Pipe must be opened before use.");
|
|
|
+
|
|
|
+ DWORD buf_rem = 0;
|
|
|
+ ERR_FAIL_COND_V(!PeekNamedPipe(fd[0], nullptr, 0, nullptr, &buf_rem, nullptr), 0);
|
|
|
+ return buf_rem;
|
|
|
+}
|
|
|
+
|
|
|
uint64_t FileAccessWindowsPipe::get_buffer(uint8_t *p_dst, uint64_t p_length) const {
|
|
|
ERR_FAIL_COND_V_MSG(fd[0] == nullptr, -1, "Pipe must be opened before use.");
|
|
|
ERR_FAIL_COND_V(!p_dst && p_length > 0, -1);
|