|
1 /* |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 using System; |
|
18 using System.Collections.Generic; |
|
19 using System.Text; |
|
20 using System.IO; |
|
21 |
|
22 namespace SymbianUtils.FileSystem |
|
23 { |
|
24 public class FSEntityDirectory : FSEntity |
|
25 { |
|
26 #region Constructors |
|
27 public FSEntityDirectory( DirectoryInfo aDirectory ) |
|
28 { |
|
29 iDirectory = aDirectory; |
|
30 } |
|
31 #endregion |
|
32 |
|
33 #region API |
|
34 #endregion |
|
35 |
|
36 #region Properties |
|
37 public override string FullName |
|
38 { |
|
39 get |
|
40 { |
|
41 StringBuilder ret = new StringBuilder(); |
|
42 // |
|
43 if ( IsValid ) |
|
44 { |
|
45 ret.Append( Directory.FullName ); |
|
46 } |
|
47 // |
|
48 return ret.ToString(); |
|
49 } |
|
50 } |
|
51 |
|
52 public override bool Exists |
|
53 { |
|
54 get |
|
55 { |
|
56 bool ret = false; |
|
57 // |
|
58 if ( IsValid ) |
|
59 { |
|
60 ret = Directory.Exists; |
|
61 } |
|
62 // |
|
63 return ret; |
|
64 } |
|
65 } |
|
66 |
|
67 public override bool IsValid |
|
68 { |
|
69 get { return iDirectory != null; } |
|
70 } |
|
71 |
|
72 public DirectoryInfo Directory |
|
73 { |
|
74 get { return iDirectory; } |
|
75 } |
|
76 #endregion |
|
77 |
|
78 #region Operators |
|
79 public static implicit operator DirectoryInfo( FSEntityDirectory aEntity ) |
|
80 { |
|
81 return aEntity.Directory; |
|
82 } |
|
83 #endregion |
|
84 |
|
85 #region Internal properties |
|
86 #endregion |
|
87 |
|
88 #region Internal methods |
|
89 #endregion |
|
90 |
|
91 #region Data members |
|
92 private DirectoryInfo iDirectory; |
|
93 #endregion |
|
94 } |
|
95 } |