[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

Re: [MacPerl] copying an alias



On Tue, May 02, 2000 at 11:37:49AM -0700, Tom Sackett wrote:
} How can I copy a file that is an alias in MacPerl?
} 
} I'm using the "find" method to copy an entire directory tree by going
} through each directory recursively. When it gets to a directory, it creates
} a new directory in the destination tree. When it finds a file, it copies it
} to the destination tree. However, my script can't handle aliases.
} 
} I've succeeded in detecting if a file is an alias using "-l", but I can't
} get the "copy" command to copy it. How is this done?

Just use symlink().  What you really want is a symbolic link
(a.k.a. "alias" in MacOS) in the new place that points to the same
thing as the alias in the old place does.  It doesn't matter how it
gets there.  A new one is just as good as a copy of the old one.

} 
} thanks in advance,
} - Tom Sackett
}   Seattle, Washington, USA
} 
} 
} 

-- 
Paul Schinder
schinder@pobox.com

# ===== Want to unsubscribe from this list?
# ===== Send mail with body "unsubscribe" to macperl-request@macperl.org