comparison dwt/internal/mozilla/nsIFile.d @ 272:dd63eb078d7a

xpcom interfaces necessary for browser code -- source adapted from dxpcom project; these modules still need to be tested and then integrated into dwt browser.
author John Reimer<terminal.node@gmail.com>
date Fri, 18 Jul 2008 05:32:53 -0700
parents
children 942da4b6558a
comparison
equal deleted inserted replaced
271:d472fae79005 272:dd63eb078d7a
1 module dwt.internal.mozilla.nsIFile;
2
3 import dwt.internal.mozilla.Common;
4 import dwt.internal.mozilla.nsID;
5 import dwt.internal.mozilla.nsISupports;
6 import dwt.internal.mozilla.nsISimpleEnumerator;
7 import dwt.internal.mozilla.nsStringAPI;
8
9 const char[] NS_IFILE_IID_STR = "c8c0a080-0868-11d3-915f-d9d889d48e3c";
10
11 const nsIID NS_IFILE_IID=
12 {0xc8c0a080, 0x0868, 0x11d3,
13 [ 0x91, 0x5f, 0xd9, 0xd8, 0x89, 0xd4, 0x8e, 0x3c ]};
14
15 extern(System)
16
17 interface nsIFile : nsISupports {
18 static const char[] IID_STR = NS_IFILE_IID_STR;
19 static const nsIID IID = NS_IFILE_IID;
20
21 enum { NORMAL_FILE_TYPE = 0U };
22 enum { DIRECTORY_TYPE = 1U };
23
24 nsresult Append(nsAString * node);
25 nsresult AppendNative(nsACString * node);
26 nsresult Normalize();
27 nsresult Create(PRUint32 type, PRUint32 permissions);
28 nsresult GetLeafName(nsAString * aLeafName);
29 nsresult SetLeafName(nsAString * aLeafName);
30 nsresult GetNativeLeafName(nsACString * aNativeLeafName);
31 nsresult SetNativeLeafName(nsACString * aNativeLeafName);
32 nsresult CopyTo(nsIFile newParentDir, nsAString * newName);
33 nsresult CopyToNative(nsIFile newParentDir, nsACString * newName);
34 nsresult CopyToFollowingLinks(nsIFile newParentDir, nsAString * newName);
35 nsresult CopyToFollowingLinksNative(nsIFile newParentDir, nsACString * newName);
36 nsresult MoveTo(nsIFile newParentDir, nsAString * newName);
37 nsresult MoveToNative(nsIFile newParentDir, nsACString * newName);
38 nsresult Remove(PRBool recursive);
39 nsresult GetPermissions(PRUint32 *aPermissions);
40 nsresult SetPermissions(PRUint32 aPermissions);
41 nsresult GetPermissionsOfLink(PRUint32 *aPermissionsOfLink);
42 nsresult SetPermissionsOfLink(PRUint32 aPermissionsOfLink);
43 nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime);
44 nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime);
45 nsresult GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink);
46 nsresult SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink);
47 nsresult GetFileSize(PRInt64 *aFileSize);
48 nsresult SetFileSize(PRInt64 aFileSize);
49 nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink);
50 nsresult GetTarget(nsAString * aTarget);
51 nsresult GetNativeTarget(nsACString * aNativeTarget);
52 nsresult GetPath(nsAString * aPath);
53 nsresult GetNativePath(nsACString * aNativePath);
54 nsresult Exists(PRBool *_retval);
55 nsresult IsWritable(PRBool *_retval);
56 nsresult IsReadable(PRBool *_retval);
57 nsresult IsExecutable(PRBool *_retval);
58 nsresult IsHidden(PRBool *_retval);
59 nsresult IsDirectory(PRBool *_retval);
60 nsresult IsFile(PRBool *_retval);
61 nsresult IsSymlink(PRBool *_retval);
62 nsresult IsSpecial(PRBool *_retval);
63 nsresult CreateUnique(PRUint32 type, PRUint32 permissions);
64 nsresult Clone(nsIFile *_retval);
65 nsresult Equals(nsIFile inFile, PRBool *_retval);
66 nsresult Contains(nsIFile inFile, PRBool recur, PRBool *_retval);
67 nsresult GetParent(nsIFile *aParent);
68 nsresult GetDirectoryEntries(nsISimpleEnumerator *aDirectoryEntries);
69 }
70