1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
---|
2 | /* ***** BEGIN LICENSE BLOCK *****
|
---|
3 | * Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
---|
4 | *
|
---|
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/
|
---|
9 | *
|
---|
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
|
---|
13 | * License.
|
---|
14 | *
|
---|
15 | * The Original Code is Mozilla Communicator client code, released
|
---|
16 | * March 31, 1998.
|
---|
17 | *
|
---|
18 | * The Initial Developer of the Original Code is
|
---|
19 | * Netscape Communications Corporation.
|
---|
20 | * Portions created by the Initial Developer are Copyright (C) 1998-2000
|
---|
21 | * the Initial Developer. All Rights Reserved.
|
---|
22 | *
|
---|
23 | * Contributor(s):
|
---|
24 | *
|
---|
25 | * Alternatively, the contents of this file may be used under the terms of
|
---|
26 | * either of the GNU General Public License Version 2 or later (the "GPL"),
|
---|
27 | * or 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.
|
---|
36 | *
|
---|
37 | * ***** END LICENSE BLOCK *****
|
---|
38 | *
|
---|
39 | * This Original Code has been modified by IBM Corporation. Modifications made by IBM
|
---|
40 | * described herein are Copyright (c) International Business Machines Corporation, 2000.
|
---|
41 | * Modifications to Mozilla code or documentation identified per MPL Section 3.3
|
---|
42 | *
|
---|
43 | * Date Modified by Description of modification
|
---|
44 | * 05/26/2000 IBM Corp. Make more like Windows.
|
---|
45 | */
|
---|
46 |
|
---|
47 | #ifndef _nsLocalFileOS2_H_
|
---|
48 | #define _nsLocalFileOS2_H_
|
---|
49 |
|
---|
50 | #include "nscore.h"
|
---|
51 | #include "nsError.h"
|
---|
52 | #include "nsString.h"
|
---|
53 | #include "nsCRT.h"
|
---|
54 | #include "nsIFile.h"
|
---|
55 | #include "nsIFactory.h"
|
---|
56 |
|
---|
57 | #define INCL_DOSFILEMGR
|
---|
58 | #define INCL_DOSERRORS
|
---|
59 | #define INCL_DOSPROCESS
|
---|
60 | #define INCL_DOSSESMGR
|
---|
61 | #define INCL_DOSMODULEMGR
|
---|
62 | #define INCL_DOSNLS
|
---|
63 | #define INCL_DOSMISC
|
---|
64 | #define INCL_WINCOUNTRY
|
---|
65 | #define INCL_WINWORKPLACE
|
---|
66 |
|
---|
67 | #include <os2.h>
|
---|
68 |
|
---|
69 | class NS_COM nsLocalFile : public nsILocalFile
|
---|
70 | {
|
---|
71 | public:
|
---|
72 | NS_DEFINE_STATIC_CID_ACCESSOR(NS_LOCAL_FILE_CID)
|
---|
73 |
|
---|
74 | nsLocalFile();
|
---|
75 |
|
---|
76 | static NS_METHOD nsLocalFileConstructor(nsISupports* outer, const nsIID& aIID, void* *aInstancePtr);
|
---|
77 |
|
---|
78 | // nsISupports interface
|
---|
79 | NS_DECL_ISUPPORTS
|
---|
80 |
|
---|
81 | // nsIFile interface
|
---|
82 | NS_DECL_NSIFILE
|
---|
83 |
|
---|
84 | // nsILocalFile interface
|
---|
85 | NS_DECL_NSILOCALFILE
|
---|
86 |
|
---|
87 | public:
|
---|
88 | static void GlobalInit();
|
---|
89 | static void GlobalShutdown();
|
---|
90 |
|
---|
91 | private:
|
---|
92 | ~nsLocalFile() {}
|
---|
93 |
|
---|
94 | nsLocalFile(const nsLocalFile& other);
|
---|
95 |
|
---|
96 | // this is the flag which indicates if I can used cached information about the file
|
---|
97 | PRPackedBool mDirty;
|
---|
98 |
|
---|
99 | // this string will alway be in native format!
|
---|
100 | nsCString mWorkingPath;
|
---|
101 |
|
---|
102 | PRFileInfo64 mFileInfo64;
|
---|
103 |
|
---|
104 | void MakeDirty();
|
---|
105 | nsresult Stat();
|
---|
106 |
|
---|
107 | nsresult CopyMove(nsIFile *newParentDir, const nsACString &newName, PRBool move);
|
---|
108 | nsresult CopySingleFile(nsIFile *source, nsIFile* dest, const nsACString &newName, PRBool move);
|
---|
109 |
|
---|
110 | nsresult SetModDate(PRInt64 aLastModifiedTime);
|
---|
111 | };
|
---|
112 |
|
---|
113 | #endif
|
---|