Bug 1748835 [wpt PR 32273] - Avoid reftest-wait timeout if ::target-text is unsupport...
[gecko.git] / xpcom / io / nsILocalFileWin.idl
blobc821044f66204b9368ee4f076306cce36df1246d
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 * Get or set whether this file is marked read-only.
54 * Throws NS_ERROR_FILE_INVALID_PATH for an invalid file.
55 * Throws NS_ERROR_FAILURE if the set or get fails.
57 attribute bool readOnly;
59 /**
60 * Setting this to true will prepend the prefix "\\?\" to all parsed file
61 * paths which match ^[A-Za-z]:\\.* (regex) syntax.
63 * There are two known issues (and potentially more) which can be resolved
64 * by the prefix:
65 * - In the Windows API, the maximum length for a path is MAX_PATH in
66 * general. However, Windows API has many functions that also have Unicode
67 * versions to permit an extended-length path for a maximum total path
68 * length of 32,767 characters.
70 * - A path component which ends with a dot is not allowed for Windows
71 * API.
73 * If either of these issues are expected to be common in your code, you
74 * should set this flag to true. (You should probably not have to set this
75 * flag to true.)
77 attribute boolean useDOSDevicePathSyntax;
79 /**
80 * Identical to nsIFile::openNSPRFileDesc except it also uses the
81 * FILE_SHARE_DELETE flag.
83 [noscript] PRFileDescStar openNSPRFileDescShareDelete(in long flags,
84 in long mode);
86 /**
87 * Return the Windows-specific file attributes of this file.
89 [noscript] unsigned long getWindowsFileAttributes();
91 /**
92 * Set or clear the Windows specific file attributes of this file.
94 * @param aSetAttrs Attribute to set on the file.
95 * @param aClearAttrs Attributes to clear on the file.
97 [noscript] void setWindowsFileAttributes(in unsigned long aSetAttrs,
98 in unsigned long aClearAttrs);