xpcom/io/nsILocalFileWin.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
michael@0 2 * This Source Code Form is subject to the terms of the Mozilla Public
michael@0 3 * License, v. 2.0. If a copy of the MPL was not distributed with this
michael@0 4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
michael@0 5 */
michael@0 6
michael@0 7 #include "nsILocalFile.idl"
michael@0 8
michael@0 9 [scriptable, builtinclass, uuid(c7b3fd13-30f2-46e5-a0d9-7a79a9b73c5b)]
michael@0 10 interface nsILocalFileWin : nsILocalFile
michael@0 11 {
michael@0 12 /**
michael@0 13 * getVersionInfoValue
michael@0 14 *
michael@0 15 * Retrieve a metadata field from the file's VERSIONINFO block.
michael@0 16 * Throws NS_ERROR_FAILURE if no value is found, or the value is empty.
michael@0 17 *
michael@0 18 * @param aField The field to look up.
michael@0 19 *
michael@0 20 */
michael@0 21 AString getVersionInfoField(in string aField);
michael@0 22
michael@0 23 /**
michael@0 24 * The canonical path of the file, which avoids short/long
michael@0 25 * pathname inconsistencies. The nsIFile persistent
michael@0 26 * descriptor is not guaranteed to be canonicalized (it may
michael@0 27 * persist either the long or the short path name). The format of
michael@0 28 * the canonical path will vary with the underlying file system:
michael@0 29 * it will typically be the short pathname on filesystems that
michael@0 30 * support both short and long path forms.
michael@0 31 */
michael@0 32 readonly attribute AString canonicalPath;
michael@0 33 [noscript] readonly attribute ACString nativeCanonicalPath;
michael@0 34
michael@0 35 /**
michael@0 36 * Windows specific file attributes.
michael@0 37 */
michael@0 38
michael@0 39 /*
michael@0 40 * WFA_SEARCH_INDEXED: Generally the default on files in Windows except
michael@0 41 * those created in temp locations. Valid on XP and up. When set the
michael@0 42 * file or directory is marked to be indexed by desktop search services.
michael@0 43 */
michael@0 44 const unsigned long WFA_SEARCH_INDEXED = 1;
michael@0 45
michael@0 46 /*
michael@0 47 * WFA_READONLY: Whether the file is readonly or not.
michael@0 48 */
michael@0 49 const unsigned long WFA_READONLY = 2;
michael@0 50
michael@0 51 /*
michael@0 52 * WFA_READWRITE: Used to clear the readonly attribute.
michael@0 53 */
michael@0 54 const unsigned long WFA_READWRITE = 4;
michael@0 55
michael@0 56 /**
michael@0 57 * fileAttributesWin
michael@0 58 *
michael@0 59 * Set or get windows specific file attributes.
michael@0 60 *
michael@0 61 * Throws NS_ERROR_FILE_INVALID_PATH for an invalid file.
michael@0 62 * Throws NS_ERROR_FAILURE if the set or get fails.
michael@0 63 */
michael@0 64 attribute unsigned long fileAttributesWin;
michael@0 65
michael@0 66 /**
michael@0 67 * setShortcut
michael@0 68 *
michael@0 69 * Creates the specified shortcut, or updates it if it already exists.
michael@0 70 *
michael@0 71 * If the shortcut is being updated (i.e. the shortcut already exists),
michael@0 72 * any excluded parameters will remain unchanged in the shortcut file.
michael@0 73 * For example, if you want to change the description of a specific
michael@0 74 * shortcut but keep the target, working dir, args, and icon the same,
michael@0 75 * pass null for those parameters and only pass in a value for the
michael@0 76 * description.
michael@0 77 *
michael@0 78 * If the shortcut does not already exist and targetFile is not specified,
michael@0 79 * setShortcut will throw NS_ERROR_FILE_TARGET_DOES_NOT_EXIST.
michael@0 80 *
michael@0 81 * @param targetFile the path that the shortcut should target
michael@0 82 * @param workingDir the working dir that should be set for the shortcut
michael@0 83 * @param args the args string that should be set for the shortcut
michael@0 84 * @param description the description that should be set for the shortcut
michael@0 85 * @param iconFile the file containing an icon to be used for this
michael@0 86 shortcut
michael@0 87 * @param iconIndex this value selects a specific icon from within
michael@0 88 iconFile. If iconFile contains only one icon, this
michael@0 89 value should be 0.
michael@0 90 */
michael@0 91 void setShortcut([optional] in nsIFile targetFile,
michael@0 92 [optional] in nsIFile workingDir,
michael@0 93 [optional] in wstring args,
michael@0 94 [optional] in wstring description,
michael@0 95 [optional] in nsIFile iconFile,
michael@0 96 [optional] in long iconIndex);
michael@0 97 };
michael@0 98

mercurial