home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


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: new Perl in a Nutshell Next: Reference: Save
Reference: new Book Index Reference: Save

Library Navigation Links

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