Perl in a Nutshell

Perl in a NutshellSearch this book
Previous: Reference: newChapter 19
Win32 Modules and Extensions
Next: Reference: Save
 

Resolve

$link->Resolve([flag])

Attempts to automatically resolve a shortcut and returns the resolved path, or undef on error; if there is no resolution, the path is returned unchanged. Note that the path is automatically updated in the Path property of the shortcut.

By default, this method acts quietly, but if you pass a value of 0 (zero) in the flag parameter, it will eventually post a dialog box prompting the user for more information. For example:

# if the target doesn't exist...
if(! -f $link->Path) {

# save the actual target for comparison
$oldpath = $link->Path;

# try to resolve it (with dialog box)
$newpath = $link->Resolve(0); 

die "Not resolved..." if $newpath == $oldpath;
}


Previous: Reference: newPerl in a NutshellNext: Reference: Save
Reference: newBook IndexReference: Save

Library Navigation Links

Copyright © 2001 O'Reilly & Associates. All rights reserved.