Since DetectFileFormat will detect both as ICS (and not VCS), needed to distinguish them.
Yeah I know ICS the newer version 2.0 and VCS is the legacy old version 1.0 and that can be found inside the files, but is there a simple yet safe method inside Aspose to help me detect if a calendar entry is ICS or VCS? (NOT based on extension, but content) Perhaps a way to load and decide based on the version number?
Please share the sample VCS file here for our reference. We will then provide you information about this requirement.
This was a generic query, not about a specific ics/vcs file
After loading ICS/VCS, is there a .Version property?
Usually VCS contains VERSION:1.x and ICS contains VERSION:2.x, not sure if this is the correct way
Unfortunately, there is no version property for VCS. Could you please share your use case in which you want to identify either it is ICS or VCS?
Cal.png (19.5 KB)
Could you please share your use case in which you want to identify either it is ICS or VCS?
It seems ics/vcs files can load to Appointment (or maybe MapiCalendar).
I also guess that Appointment class at some point will process them in a different manner internally.
So a .Version property to return the findings seems harmless.
Anyway, I’d use this:
Dim MyFile As String = File.ReadAllText(InputCalendar)
If MyFile.IndexOf(“VERSION:1.0”, 0, MyFile.Length, StringComparison.OrdinalIgnoreCase) > 0 Then…
If MyFile.IndexOf(“VERSION:2.0”, 0, MyFile.Length, StringComparison.OrdinalIgnoreCase) > 0 Then…
But it’s not safe, maybe inside the file, user entered that text, or his attachments contains it, and I’ll get the wrong results, do you have any suggestion how to safely search for that string inside ICS/VCS files?
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.
Issue ID(s): EMAILNET-40926
You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.
Hello, are we able to detect v1 vs v2 now?
The ticket is still open, so this property hasn’t been added yet.