mirror of
https://onedev.site.tesses.net/crosslang
synced 2026-04-18 08:37:04 +00:00
Add RouteServer, TextReader/TextWriter and file locks
This commit is contained in:
@@ -169,6 +169,26 @@ namespace Tesses::CrossLang {
|
||||
|
||||
}
|
||||
}
|
||||
void TObjectVFS::Lock(Tesses::Framework::Filesystem::VFSPath path)
|
||||
{
|
||||
TDictionary* dict;
|
||||
if(GetObjectHeap(this->obj, dict))
|
||||
{
|
||||
GCList ls(this->ls->GetGC());
|
||||
dict->CallMethod(ls, "Lock",{path});
|
||||
|
||||
}
|
||||
}
|
||||
void TObjectVFS::Unlock(Tesses::Framework::Filesystem::VFSPath path)
|
||||
{
|
||||
TDictionary* dict;
|
||||
if(GetObjectHeap(this->obj, dict))
|
||||
{
|
||||
GCList ls(this->ls->GetGC());
|
||||
dict->CallMethod(ls, "Unlock",{path});
|
||||
|
||||
}
|
||||
}
|
||||
bool TObjectVFS::RegularFileExists(Tesses::Framework::Filesystem::VFSPath path)
|
||||
{
|
||||
|
||||
@@ -573,8 +593,12 @@ namespace Tesses::CrossLang {
|
||||
}
|
||||
TObjectVFS::~TObjectVFS()
|
||||
{
|
||||
|
||||
Close();
|
||||
TDictionary* dict;
|
||||
if(GetObjectHeap(this->obj, dict))
|
||||
{
|
||||
GCList ls(this->ls->GetGC());
|
||||
dict->CallMethod(ls,"Close",{});
|
||||
}
|
||||
delete this->ls;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user