1 module org.eclipse.swt.internal.mozilla.nsIFile; 2 3 import java.lang.all; 4 5 import org.eclipse.swt.internal.mozilla.Common; 6 import org.eclipse.swt.internal.mozilla.nsID; 7 import org.eclipse.swt.internal.mozilla.nsISupports; 8 import org.eclipse.swt.internal.mozilla.nsISimpleEnumerator; 9 import org.eclipse.swt.internal.mozilla.nsStringAPI; 10 11 const char[] NS_IFILE_IID_STR = "c8c0a080-0868-11d3-915f-d9d889d48e3c"; 12 13 const nsIID NS_IFILE_IID= 14 {0xc8c0a080, 0x0868, 0x11d3, 15 [ 0x91, 0x5f, 0xd9, 0xd8, 0x89, 0xd4, 0x8e, 0x3c ]}; 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 extern(System): 25 nsresult Append(nsAString * node); 26 nsresult AppendNative(nsACString * node); 27 nsresult Normalize(); 28 nsresult Create(PRUint32 type, PRUint32 permissions); 29 nsresult GetLeafName(nsAString * aLeafName); 30 nsresult SetLeafName(nsAString * aLeafName); 31 nsresult GetNativeLeafName(nsACString * aNativeLeafName); 32 nsresult SetNativeLeafName(nsACString * aNativeLeafName); 33 nsresult CopyTo(nsIFile newParentDir, nsAString * newName); 34 nsresult CopyToNative(nsIFile newParentDir, nsACString * newName); 35 nsresult CopyToFollowingLinks(nsIFile newParentDir, nsAString * newName); 36 nsresult CopyToFollowingLinksNative(nsIFile newParentDir, nsACString * newName); 37 nsresult MoveTo(nsIFile newParentDir, nsAString * newName); 38 nsresult MoveToNative(nsIFile newParentDir, nsACString * newName); 39 nsresult Remove(PRBool recursive); 40 nsresult GetPermissions(PRUint32 *aPermissions); 41 nsresult SetPermissions(PRUint32 aPermissions); 42 nsresult GetPermissionsOfLink(PRUint32 *aPermissionsOfLink); 43 nsresult SetPermissionsOfLink(PRUint32 aPermissionsOfLink); 44 nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime); 45 nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime); 46 nsresult GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink); 47 nsresult SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink); 48 nsresult GetFileSize(PRInt64 *aFileSize); 49 nsresult SetFileSize(PRInt64 aFileSize); 50 nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink); 51 nsresult GetTarget(nsAString * aTarget); 52 nsresult GetNativeTarget(nsACString * aNativeTarget); 53 nsresult GetPath(nsAString * aPath); 54 nsresult GetNativePath(nsACString * aNativePath); 55 nsresult Exists(PRBool *_retval); 56 nsresult IsWritable(PRBool *_retval); 57 nsresult IsReadable(PRBool *_retval); 58 nsresult IsExecutable(PRBool *_retval); 59 nsresult IsHidden(PRBool *_retval); 60 nsresult IsDirectory(PRBool *_retval); 61 nsresult IsFile(PRBool *_retval); 62 nsresult IsSymlink(PRBool *_retval); 63 nsresult IsSpecial(PRBool *_retval); 64 nsresult CreateUnique(PRUint32 type, PRUint32 permissions); 65 nsresult Clone(nsIFile *_retval); 66 nsresult Equals(nsIFile inFile, PRBool *_retval); 67 nsresult Contains(nsIFile inFile, PRBool recur, PRBool *_retval); 68 nsresult GetParent(nsIFile *aParent); 69 nsresult GetDirectoryEntries(nsISimpleEnumerator *aDirectoryEntries); 70 } 71