Say I have two horologs or timestamps, how can I compare them? I know that just time1 > time2 doesn't work because it will compare them as strings which is not correct.
I found one interesting moment in Cache Object Script. It doesn't have(or at least I didn't find) trimming function. By trimming I mean if a string has some whitespaces/tabs/carriage returns from very beginning or/and from very right, this function removes them.
I know that Cache files can be stored as XML and UDL based files. Is there any way to determine in which format the file(class, routine, dfi and so on) is stored? Because you can easily name your XML based file as class.cls and it will be perfectly valid.
I know that one way to check whether this file is in XML format is just try to parse it like
Set st = ##class(%XML.TextReader).ParseStream(contentStream)
I have a set of file names (e.g. file.cls, file2.mac and so on) and I need to check whether these files are mapped in %ALL or current namespace.
I found that if I open Globals in the current namespace I can see mapped packages. And If I open this global I see all files that are to this namespace and %SYS. The problem is these files are enumerated in a json object(apparently)
I want to add a class to my project. This class is in UDL format.
I know that there is a method: ##class(%Compiler.UDL.TextServices).SetTextFromStream. The problem is that to use this method I need to know the name of the class (including all packages) in advance. But, a class can have any name(I mean C:/source/AAA/BBB/CCC.cls, but the real name is Sample.Human.cls).
For now I found only one way to get to know the name of a class - just parse the class code and search for a word which is followed by "Class" word. Is there any better way to do that?
I want to get access to the folder where all files of the namespace are stored using COS. I found a way to get access to class files and found a folder where all csp, html, css etc files are stored.
However, is there any folder which contains all files(even .mac and .int)?
Or, probably, there is a method which gives all files content?