1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
15 * The Original Code is the directory index parsing code.
17 * The Initial Developer of the Original Code is
19 * Portions created by the Initial Developer are Copyright (C) 2001
20 * the Initial Developer. All Rights Reserved.
23 * Bradley Baetz <bbaetz@cs.mcgill.ca>
25 * Alternatively, the contents of this file may be used under the terms of
26 * either the GNU General Public License Version 2 or later (the "GPL"), or
27 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
28 * in which case the provisions of the GPL or the LGPL are applicable instead
29 * of those above. If you wish to allow use of your version of this file only
30 * under the terms of either the GPL or the LGPL, and not to allow others to
31 * use your version of this file under the terms of the MPL, indicate your
32 * decision by deleting the provisions above and replace them with the notice
33 * and other provisions required by the GPL or the LGPL. If you do not delete
34 * the provisions above, a recipient may use your version of this file under
35 * the terms of any one of the MPL, the GPL or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
39 #include
"nsISupports.idl"
41 /** A class holding information about a directory index.
42 * These have no reference back to their original source -
43 * changing these attributes won't affect the directory
45 [scriptable
, uuid(23bbabd0
-1dd2
-11b2
-86b7
-aad68ae7d7e0
)]
46 interface nsIDirIndex
: nsISupports
49 * Entry's type is unknown
51 const unsigned long TYPE_UNKNOWN
= 0;
54 * Entry is a directory
56 const unsigned long TYPE_DIRECTORY
= 1;
61 const unsigned long TYPE_FILE
= 2;
66 const unsigned long TYPE_SYMLINK
= 3;
69 * The type of the entry - one of the constants above
71 attribute
unsigned long type
;
74 * The content type - may be null if it is unknown.
75 * Unspecified for directories
77 attribute
string contentType
;
80 * The fully qualified filename, expressed as a uri
82 * This is encoded with the encoding specified in
83 * the nsIDirIndexParser, and is also escaped.
85 attribute
string location
;
88 * A description for the filename, which should be
89 * displayed by a viewer
91 attribute wstring description
;
94 * File size, with -1 meaning "unknown"
96 attribute
long long size
;
99 * Last-modified time in seconds-since-epoch.
100 * -1 means unknown - this is valid, because there were no
101 * ftp servers in 1969
103 attribute PRTime lastModified
;
108 #define NS_DIRINDEX_CID \
109 /* { f6913e2e-1dd1-11b2-84be-f455dee342af } */ \
113 { 0x84, 0xbe, 0xf4, 0x55, 0xde, 0xe3, 0x42, 0xaf } \