You are viewing limited content. For full access, please sign in.

Question

Question

IF ILFEntry object is a shortcut, how does one access the actual document instead of the shortcut in LFSO83Lib?

asked on May 5, 2015

I can't find a way to tap into the shortcut folder as follow:

else if (entry.IsShortcut == true)
				{
					Console.WriteLine(entry.Name + " is a Shortcut");
					try
					{
						LFFolder folS = (LFFolder)db.GetEntryByID(entry.ID);
						ILFCollection subContentsS = folS.GetChildren();
						IterateFolder(subContentsS, db);
						Console.WriteLine("Shortcut>Folder");
					}

It works if the entry is a folder but not if it is a shortcut of a folder.

0 0

Answer

SELECTED ANSWER
replied on May 5, 2015

LFShortcut.EntryReferenced returns the shortcut target:

LFShortcut shortcut = (LFShortctut)entry;
LFEntry target = shortcut.EntryReferenced;

 

3 0

Replies

You are not allowed to reply in this post.
replied on May 5, 2015

ILFShortcut has an EntryReferenced property, so you would do something like:

LFFolder target = (LFFolder)((LFShortcut)entry).EntryReferenced;

You are not allowed to follow up in this post.

Sign in to reply to this post.