Denver Braughler wrote:
Bernd Mueller wrote:

Denver Braughler wrote:

Bernd Mueller wrote:

Set file=##class(%File).%New("file.txt") ...
file.SizeGet()

I believe that method resolves to $ZU(140,1,"file.txt").

Wrong!


What is wrong?
(Actually, you are wrong.  I am correct.)

ok ok ... stay cool ... you are right!

SizeGet() is a method from the Stream-Interface


In this case, not really - ##class(%File).SizeGet() is a method from %File.

Class %Library.File Extends %AbstractStream [ ProcedureBlock ]
{

Method SizeGet() As %Integer [ CodeMode = expression ]
{
..GetFileSize(..Name)
}

}


and it works ...


On Windows, as I stated.


I don't know whether it works on every platform.
What platforms have you tried it on?

on Windows. But i think it will work on every platform.


Yeah, I hope so too.
But if we don't know, and the person is using VMS, so it is up to us to be responsible to say the limit of what we know.
And we only know for Windows for certain.

Linux is also working! I'v tested on ...

>w $zv
Cache for UNIX (Linux Intel/32-bit) 5.0.1 (Build 544U) Wed Apr 9 2003 10:56:40 T

But VMS is NOT working :-(

>w $zv
Cache for OpenVMS/ALPHA V7.x (Alpha) 5.0.5 (Build 936)  6-FEB-2004 15:56:37.24

>...

>Set file=##class(%File).%New(File)

>w file
1�%Library.File
>w file.Open("RW")
1
>w file.WriteLine("xxx")
1
>w file.SizeGet()
-98954
>w file.WriteLine("xxx")
1
>w file.SizeGet()
-98954
>do file.Close()

>k file

Regards...
Bernd!



Reply via email to