| 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 |
interface nsIFile : nsISupports { |
|---|
| 16 |
static const char[] IID_STR = NS_IFILE_IID_STR; |
|---|
| 17 |
static const nsIID IID = NS_IFILE_IID; |
|---|
| 18 |
|
|---|
| 19 |
enum { NORMAL_FILE_TYPE = 0U }; |
|---|
| 20 |
enum { DIRECTORY_TYPE = 1U }; |
|---|
| 21 |
|
|---|
| 22 |
extern(System): |
|---|
| 23 |
nsresult Append(nsAString * node); |
|---|
| 24 |
nsresult AppendNative(nsACString * node); |
|---|
| 25 |
nsresult Normalize(); |
|---|
| 26 |
nsresult Create(PRUint32 type, PRUint32 permissions); |
|---|
| 27 |
nsresult GetLeafName(nsAString * aLeafName); |
|---|
| 28 |
nsresult SetLeafName(nsAString * aLeafName); |
|---|
| 29 |
nsresult GetNativeLeafName(nsACString * aNativeLeafName); |
|---|
| 30 |
nsresult SetNativeLeafName(nsACString * aNativeLeafName); |
|---|
| 31 |
nsresult CopyTo(nsIFile newParentDir, nsAString * newName); |
|---|
| 32 |
nsresult CopyToNative(nsIFile newParentDir, nsACString * newName); |
|---|
| 33 |
nsresult CopyToFollowingLinks(nsIFile newParentDir, nsAString * newName); |
|---|
| 34 |
nsresult CopyToFollowingLinksNative(nsIFile newParentDir, nsACString * newName); |
|---|
| 35 |
nsresult MoveTo(nsIFile newParentDir, nsAString * newName); |
|---|
| 36 |
nsresult MoveToNative(nsIFile newParentDir, nsACString * newName); |
|---|
| 37 |
nsresult Remove(PRBool recursive); |
|---|
| 38 |
nsresult GetPermissions(PRUint32 *aPermissions); |
|---|
| 39 |
nsresult SetPermissions(PRUint32 aPermissions); |
|---|
| 40 |
nsresult GetPermissionsOfLink(PRUint32 *aPermissionsOfLink); |
|---|
| 41 |
nsresult SetPermissionsOfLink(PRUint32 aPermissionsOfLink); |
|---|
| 42 |
nsresult GetLastModifiedTime(PRInt64 *aLastModifiedTime); |
|---|
| 43 |
nsresult SetLastModifiedTime(PRInt64 aLastModifiedTime); |
|---|
| 44 |
nsresult GetLastModifiedTimeOfLink(PRInt64 *aLastModifiedTimeOfLink); |
|---|
| 45 |
nsresult SetLastModifiedTimeOfLink(PRInt64 aLastModifiedTimeOfLink); |
|---|
| 46 |
nsresult GetFileSize(PRInt64 *aFileSize); |
|---|
| 47 |
nsresult SetFileSize(PRInt64 aFileSize); |
|---|
| 48 |
nsresult GetFileSizeOfLink(PRInt64 *aFileSizeOfLink); |
|---|
| 49 |
nsresult GetTarget(nsAString * aTarget); |
|---|
| 50 |
nsresult GetNativeTarget(nsACString * aNativeTarget); |
|---|
| 51 |
nsresult GetPath(nsAString * aPath); |
|---|
| 52 |
nsresult GetNativePath(nsACString * aNativePath); |
|---|
| 53 |
nsresult Exists(PRBool *_retval); |
|---|
| 54 |
nsresult IsWritable(PRBool *_retval); |
|---|
| 55 |
nsresult IsReadable(PRBool *_retval); |
|---|
| 56 |
nsresult IsExecutable(PRBool *_retval); |
|---|
| 57 |
nsresult IsHidden(PRBool *_retval); |
|---|
| 58 |
nsresult IsDirectory(PRBool *_retval); |
|---|
| 59 |
nsresult IsFile(PRBool *_retval); |
|---|
| 60 |
nsresult IsSymlink(PRBool *_retval); |
|---|
| 61 |
nsresult IsSpecial(PRBool *_retval); |
|---|
| 62 |
nsresult CreateUnique(PRUint32 type, PRUint32 permissions); |
|---|
| 63 |
nsresult Clone(nsIFile *_retval); |
|---|
| 64 |
nsresult Equals(nsIFile inFile, PRBool *_retval); |
|---|
| 65 |
nsresult Contains(nsIFile inFile, PRBool recur, PRBool *_retval); |
|---|
| 66 |
nsresult GetParent(nsIFile *aParent); |
|---|
| 67 |
nsresult GetDirectoryEntries(nsISimpleEnumerator *aDirectoryEntries); |
|---|
| 68 |
} |
|---|