// public static string GetUserDirectory(Uno.IO.UserDirectory dir) [static] :1114 uString* FileSystemImpl::GetUserDirectory(int dir_) { try { return uStringFromXliString(Xli::Disk->GetSystemDirectory((Xli::SystemDirectory)dir_)); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public static void DeleteFile(string filename) [static] :1150 void FileSystemImpl::DeleteFile(uString* filename_) { try { Xli::Disk->DeleteFile(uStringToXliString(filename_)); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public generated override sealed extern long get_Position() :634 void CppXliStream__get_Position_fn(CppXliStream* __this, int64_t* __retval) { try { return *__retval = __this->_handle->GetPosition(), void(); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public static extern Uno.IO.CppXliStreamHandle CppXliOpenRead(string filename) [static] :1105 ::Xli::Stream* FileSystemImpl::CppXliOpenRead(uString* filename_) { try { return Xli::Disk->OpenFile(uStringToXliString(filename_), Xli::FileModeRead); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public override sealed extern void Flush() :651 void CppXliStream__Flush_fn(CppXliStream* __this) { try { __this->_handle->Flush(); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public static void WriteAllBytes(string filename, byte[] bytes) [static] :1216 void FileSystemImpl::WriteAllBytes(uString* filename_, uArray* bytes_) { try { Xli::Managed<Xli::Stream> f = Xli::Disk->OpenFile(uStringToXliString(filename_), Xli::FileModeWrite); f->Write(bytes_->Ptr(), 1, bytes_->Length()); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public generated override sealed extern void set_Position(long value) :634 void CppXliStream__set_Position_fn(CppXliStream* __this, int64_t* value_) { int64_t value__ = *value_; try { __this->_handle->Seek((int)value__, Xli::SeekOriginBegin); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public override sealed extern void Write(byte[] src, int byteOffset, int byteCount) :645 void CppXliStream__Write_fn(CppXliStream* __this, uArray* src_, int* byteOffset_, int* byteCount_) { int byteOffset__ = *byteOffset_; int byteCount__ = *byteCount_; try { // TODO: Bounds check __this->_handle->Write((const uint8_t*)src_->Ptr() + byteOffset__, 1, byteCount__); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
// public override sealed extern int Read(byte[] dst, int byteOffset, int byteCount) :642 void CppXliStream__Read_fn(CppXliStream* __this, uArray* dst_, int* byteOffset_, int* byteCount_, int* __retval) { int byteOffset__ = *byteOffset_; int byteCount__ = *byteCount_; try { // TODO: Bounds check return *__retval = __this->_handle->Read((uint8_t*)dst_->Ptr() + byteOffset__, 1, byteCount__), void(); } catch (const Xli::Exception& e) { throw uThrowable(::g::Uno::IO::IOException::New4(uStringFromXliString(e.GetMessage())), e.GetFunction(), e.GetLine()); } }
uString* uGetStackTrace() { Xli::StringBuilder sb; uThreadData* thread = uGetThreadData(); for (int i = thread->CallStack.Length() - 1; i >= 0; i--) { if (sb.GetLength() > 0) sb += '\n'; uCallStackFrame& frame = thread->CallStack[i]; sb += " at "; sb += frame.Type; sb += '.'; sb += frame.Function; } return uStringFromXliString(sb.ToString()); }
uString* uGetStackTrace() { Xli::StringBuilder sb; uThreadData* thread = uGetThreadData(); for (uCallStackFrame* frame = thread->CallStackPtr; frame >= thread->CallStack; frame--) { if (sb.GetLength() > 0) sb += '\n'; sb += " at "; sb += frame->Type; sb += '.'; sb += frame->Function; } return uStringFromXliString(sb.ToString()); }
virtual bool OnTextInput(Xli::Window* wnd, const Xli::String& text) { uAutoReleasePool pool; if (::app::Uno::Runtime::Implementation::Internal::Bootstrapper__OnTextInput(NULL, wnd, uStringFromXliString(text))) return true; return false; }