Bug 1690340 - Part 2: Use the new naming for the developer tools menu items. r=jdescottes
[gecko.git] / xpcom / io / nsILocalFileWin.idl
blob12aa098b379e042239fcb93d78b01a706dec134e
1 /* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*-
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 */
7 #include "nsIFile.idl"
9 %{C++
10 struct PRFileDesc;
13 [ptr] native PRFileDescStar(PRFileDesc);
15 [scriptable, builtinclass, uuid(e7a3a954-384b-4aeb-a5f7-55626b0de9be)]
16 interface nsILocalFileWin : nsIFile
18 /**
19 * initWithCommandLine
21 * Initialize this object based on the main app path of a commandline
22 * handler.
24 * @param aCommandLine
25 * the commandline to parse an app path out of.
27 void initWithCommandLine(in AString aCommandLine);
28 /**
29 * getVersionInfoValue
31 * Retrieve a metadata field from the file's VERSIONINFO block.
32 * Throws NS_ERROR_FAILURE if no value is found, or the value is empty.
34 * @param aField The field to look up.
37 AString getVersionInfoField(in string aField);
39 /**
40 * The canonical path of the file, which avoids short/long
41 * pathname inconsistencies. The nsIFile persistent
42 * descriptor is not guaranteed to be canonicalized (it may
43 * persist either the long or the short path name). The format of
44 * the canonical path will vary with the underlying file system:
45 * it will typically be the short pathname on filesystems that
46 * support both short and long path forms.
48 readonly attribute AString canonicalPath;
49 [noscript] readonly attribute ACString nativeCanonicalPath;
51 /**
52 * Windows specific file attributes.
56 * WFA_SEARCH_INDEXED: Generally the default on files in Windows except
57 * those created in temp locations. Valid on XP and up. When set the
58 * file or directory is marked to be indexed by desktop search services.
60 const unsigned long WFA_SEARCH_INDEXED = 1;
63 * WFA_READONLY: Whether the file is readonly or not.
65 const unsigned long WFA_READONLY = 2;
68 * WFA_READWRITE: Used to clear the readonly attribute.
70 const unsigned long WFA_READWRITE = 4;
72 /**
73 * fileAttributesWin
75 * Set or get windows specific file attributes.
77 * Throws NS_ERROR_FILE_INVALID_PATH for an invalid file.
78 * Throws NS_ERROR_FAILURE if the set or get fails.
80 attribute unsigned long fileAttributesWin;
82 /**
83 * Setting this to true will prepend the prefix "\\?\" to all parsed file
84 * paths which match ^[A-Za-z]:\\.* (regex) syntax.
86 * There are two known issues (and potentially more) which can be resolved
87 * by the prefix:
88 * - In the Windows API, the maximum length for a path is MAX_PATH in
89 * general. However, Windows API has many functions that also have Unicode
90 * versions to permit an extended-length path for a maximum total path
91 * length of 32,767 characters.
93 * - A path component which ends with a dot is not allowed for Windows
94 * API.
96 * If either of these issues are expected to be common in your code, you
97 * should set this flag to true. (You should probably not have to set this
98 * flag to true.)
100 attribute boolean useDOSDevicePathSyntax;
103 * Identical to nsIFile::openNSPRFileDesc except it also uses the
104 * FILE_SHARE_DELETE flag.
106 [noscript] PRFileDescStar openNSPRFileDescShareDelete(in long flags,
107 in long mode);