comparison dwt/internal/mozilla/nsIFile.d @ 45:d8635bb48c7c

Merge with SWT 3.5
author Jacob Carlborg <doob@me.com>
date Mon, 01 Dec 2008 17:07:00 +0100
parents
children 5583f8eeee6c
comparison
equal deleted inserted replaced
44:ca5e494f2bbf 45:d8635bb48c7c
1 /* ***** BEGIN LICENSE BLOCK *****
2 * Version: MPL 1.1
3 *
4 * The contents of this file are subject to the Mozilla Public License Version
5 * 1.1 (the "License"); you may not use this file except in compliance with
6 * the License. You may obtain a copy of the License at
7 * http://www.mozilla.org/MPL/
8 *
9 * Software distributed under the License is distributed on an "AS IS" basis,
10 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
11 * for the specific language governing rights and limitations under the
12 * License.
13 *
14 * The Original Code is Mozilla Communicator client code, released March 31, 1998.
15 *
16 * The Initial Developer of the Original Code is
17 * Netscape Communications Corporation.
18 * Portions created by Netscape are Copyright (C) 1998-1999
19 * Netscape Communications Corporation. All Rights Reserved.
20 *
21 * Contributor(s):
22 *
23 * IBM
24 * - Binding to permit interfacing between Mozilla and DWT
25 * - Copyright (C) 2003, 2008 IBM Corp. All Rights Reserved.
26 *
27 * ***** END LICENSE BLOCK ***** */
28 module dwt.internal.mozilla.nsIFile;
29
30 import dwt.dwthelper.utils;
31
32 public class nsIFile extends nsISupports {
33
34 static final int LAST_METHOD_ID = nsISupports.LAST_METHOD_ID + 45;
35
36 public static final String NS_IFILE_IID_STR =
37 "c8c0a080-0868-11d3-915f-d9d889d48e3c";
38
39 public static final nsID NS_IFILE_IID =
40 new nsID(NS_IFILE_IID_STR);
41
42 public nsIFile(int /*long*/ address) {
43 super(address);
44 }
45
46 public static final int NORMAL_FILE_TYPE = 0;
47
48 public static final int DIRECTORY_TYPE = 1;
49
50 public int Append(int /*long*/ node) {
51 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 1, getAddress(), node);
52 }
53
54 public int AppendNative(int /*long*/ node) {
55 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 2, getAddress(), node);
56 }
57
58 public int Normalize() {
59 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 3, getAddress());
60 }
61
62 public int Create(int type, int permissions) {
63 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 4, getAddress(), type, permissions);
64 }
65
66 public int GetLeafName(int /*long*/ aLeafName) {
67 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 5, getAddress(), aLeafName);
68 }
69
70 public int SetLeafName(int /*long*/ aLeafName) {
71 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 6, getAddress(), aLeafName);
72 }
73
74 public int GetNativeLeafName(int /*long*/ aNativeLeafName) {
75 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 7, getAddress(), aNativeLeafName);
76 }
77
78 public int SetNativeLeafName(int /*long*/ aNativeLeafName) {
79 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 8, getAddress(), aNativeLeafName);
80 }
81
82 public int CopyTo(int /*long*/ newParentDir, int /*long*/ newName) {
83 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 9, getAddress(), newParentDir, newName);
84 }
85
86 public int CopyToNative(int /*long*/ newParentDir, int /*long*/ newName) {
87 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 10, getAddress(), newParentDir, newName);
88 }
89
90 public int CopyToFollowingLinks(int /*long*/ newParentDir, int /*long*/ newName) {
91 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 11, getAddress(), newParentDir, newName);
92 }
93
94 public int CopyToFollowingLinksNative(int /*long*/ newParentDir, int /*long*/ newName) {
95 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 12, getAddress(), newParentDir, newName);
96 }
97
98 public int MoveTo(int /*long*/ newParentDir, int /*long*/ newName) {
99 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 13, getAddress(), newParentDir, newName);
100 }
101
102 public int MoveToNative(int /*long*/ newParentDir, int /*long*/ newName) {
103 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 14, getAddress(), newParentDir, newName);
104 }
105
106 public int Remove(int recursive) {
107 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 15, getAddress(), recursive);
108 }
109
110 public int GetPermissions(int[] aPermissions) {
111 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 16, getAddress(), aPermissions);
112 }
113
114 public int SetPermissions(int aPermissions) {
115 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 17, getAddress(), aPermissions);
116 }
117
118 public int GetPermissionsOfLink(int[] aPermissionsOfLink) {
119 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 18, getAddress(), aPermissionsOfLink);
120 }
121
122 public int SetPermissionsOfLink(int aPermissionsOfLink) {
123 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 19, getAddress(), aPermissionsOfLink);
124 }
125
126 public int GetLastModifiedTime(long[] aLastModifiedTime) {
127 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 20, getAddress(), aLastModifiedTime);
128 }
129
130 public int SetLastModifiedTime(long aLastModifiedTime) {
131 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 21, getAddress(), aLastModifiedTime);
132 }
133
134 public int GetLastModifiedTimeOfLink(long[] aLastModifiedTimeOfLink) {
135 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 22, getAddress(), aLastModifiedTimeOfLink);
136 }
137
138 public int SetLastModifiedTimeOfLink(long aLastModifiedTimeOfLink) {
139 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 23, getAddress(), aLastModifiedTimeOfLink);
140 }
141
142 public int GetFileSize(long[] aFileSize) {
143 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 24, getAddress(), aFileSize);
144 }
145
146 public int SetFileSize(long aFileSize) {
147 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 25, getAddress(), aFileSize);
148 }
149
150 public int GetFileSizeOfLink(long[] aFileSizeOfLink) {
151 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 26, getAddress(), aFileSizeOfLink);
152 }
153
154 public int GetTarget(int /*long*/ aTarget) {
155 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 27, getAddress(), aTarget);
156 }
157
158 public int GetNativeTarget(int /*long*/ aNativeTarget) {
159 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 28, getAddress(), aNativeTarget);
160 }
161
162 public int GetPath(int /*long*/ aPath) {
163 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 29, getAddress(), aPath);
164 }
165
166 public int GetNativePath(int /*long*/ aNativePath) {
167 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 30, getAddress(), aNativePath);
168 }
169
170 public int Exists(int[] _retval) {
171 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 31, getAddress(), _retval);
172 }
173
174 public int IsWritable(int[] _retval) {
175 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 32, getAddress(), _retval);
176 }
177
178 public int IsReadable(int[] _retval) {
179 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 33, getAddress(), _retval);
180 }
181
182 public int IsExecutable(int[] _retval) {
183 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 34, getAddress(), _retval);
184 }
185
186 public int IsHidden(int[] _retval) {
187 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 35, getAddress(), _retval);
188 }
189
190 public int IsDirectory(int[] _retval) {
191 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 36, getAddress(), _retval);
192 }
193
194 public int IsFile(int[] _retval) {
195 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 37, getAddress(), _retval);
196 }
197
198 public int IsSymlink(int[] _retval) {
199 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 38, getAddress(), _retval);
200 }
201
202 public int IsSpecial(int[] _retval) {
203 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 39, getAddress(), _retval);
204 }
205
206 public int CreateUnique(int type, int permissions) {
207 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 40, getAddress(), type, permissions);
208 }
209
210 public int Clone(int /*long*/[] _retval) {
211 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 41, getAddress(), _retval);
212 }
213
214 public int Equals(int /*long*/ inFile, int[] _retval) {
215 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 42, getAddress(), inFile, _retval);
216 }
217
218 public int Contains(int /*long*/ inFile, int recur, int[] _retval) {
219 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 43, getAddress(), inFile, recur, _retval);
220 }
221
222 public int GetParent(int /*long*/[] aParent) {
223 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 44, getAddress(), aParent);
224 }
225
226 public int GetDirectoryEntries(int /*long*/[] aDirectoryEntries) {
227 return XPCOM.VtblCall(nsISupports.LAST_METHOD_ID + 45, getAddress(), aDirectoryEntries);
228 }
229 }