Open Bug 350667 Opened 17 years ago Updated 1 year ago

Creating shortcuts for files


(Firefox :: File Handling, defect)






(Reporter: atg2dg, Unassigned)


(Blocks 1 open bug)


User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060713 Firefox/
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv: Gecko/20060713 Firefox/

There is no way to create a shortcut/symlink/alias for a file using nsILocalFile (or any other XPCOM as far as i know) in a crossplatform way. For Windows a shortcut can be created as a file (although the information about the format of the file is not very easy available), but the symlinks and aliases as far as i know can't be created like that, and even if they can it means that a developer would have to deal with at least 3 different file formats (i have no idea what are the equivalents for the other OSes and how they are created). It would be much cleaner to have a function like file.createLink(dirToCreateIn,type), where file and dirToCreateIn are nsILocalFile - s, and type is the type of the link - soft or hard (for linux for example, but i hear MS will have similar type of links in Vista). A function like that will be very helpful when creating applications for XULRunner, or extensions working on the filesystem. Like my extension Firefly - it's a file manager and normally a filemanager needs a way to create shortcuts of files.

Reproducible: Always
Version: unspecified → 1.5.0.x Branch
Component: OS Integration → File Handling
Product: Firefox → Core
QA Contact: os.integration → file-handling
Version: 1.5.0.x Branch → unspecified
Blocks: symlink
Product: Core → Firefox
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.