1 module org.eclipse.swt.internal.mozilla.nsILocalFile;
2 
3 import java.lang.all;
4 
5 import org.eclipse.swt.internal.mozilla.Common;
6 import org.eclipse.swt.internal.mozilla.prlink;
7 import org.eclipse.swt.internal.mozilla.prio;
8 import org.eclipse.swt.internal.mozilla.prtime;
9 import org.eclipse.swt.internal.mozilla.nsID;
10 import org.eclipse.swt.internal.mozilla.nsIFile;
11 import org.eclipse.swt.internal.mozilla.nsStringAPI;
12 
13 version(Tango){
14     import tango.stdc.stdio : FILE;
15 } else { // Phobos
16     import std.c.stdio : FILE;
17 }
18 
19 const char[] NS_ILOCALFILE_IID_STR = "aa610f20-a889-11d3-8c81-000064657374";
20 
21 const nsIID NS_ILOCALFILE_IID= 
22   {0xaa610f20, 0xa889, 0x11d3, 
23     [ 0x8c, 0x81, 0x00, 0x00, 0x64, 0x65, 0x73, 0x74 ]};
24 
25 interface nsILocalFile : nsIFile {
26 
27     static const char[] IID_STR = NS_ILOCALFILE_IID_STR;
28     static const nsIID IID = NS_ILOCALFILE_IID;
29 
30 extern(System):
31     nsresult InitWithPath(nsAString * filePath);
32     nsresult InitWithNativePath(nsACString * filePath);
33     nsresult InitWithFile(nsILocalFile aFile);
34     nsresult GetFollowLinks(PRBool *aFollowLinks);
35     nsresult SetFollowLinks(PRBool aFollowLinks);
36     nsresult OpenNSPRFileDesc(PRInt32 flags, PRInt32 mode, PRFileDesc * *_retval);
37     nsresult OpenANSIFileDesc(char *mode, FILE * *_retval);
38     nsresult Load(PRLibrary * *_retval);
39     nsresult GetDiskSpaceAvailable(PRInt64 *aDiskSpaceAvailable);
40     nsresult AppendRelativePath(nsAString * relativeFilePath);
41     nsresult AppendRelativeNativePath(nsACString * relativeFilePath);
42     nsresult GetPersistentDescriptor(nsACString * aPersistentDescriptor);
43     nsresult SetPersistentDescriptor(nsACString * aPersistentDescriptor);
44     nsresult Reveal();
45     nsresult Launch();
46     nsresult GetRelativeDescriptor(nsILocalFile fromFile, nsACString * _retval);
47     nsresult SetRelativeDescriptor(nsILocalFile fromFile, nsACString * relativeDesc);
48 }
49