diff options
Diffstat (limited to 'OpenSim/Framework/Communications/Cache/FileAssetClient.cs')
-rw-r--r-- | OpenSim/Framework/Communications/Cache/FileAssetClient.cs | 37 |
1 files changed, 35 insertions, 2 deletions
diff --git a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs index 9a60b53..e6574a1 100644 --- a/OpenSim/Framework/Communications/Cache/FileAssetClient.cs +++ b/OpenSim/Framework/Communications/Cache/FileAssetClient.cs | |||
@@ -26,16 +26,49 @@ | |||
26 | */ | 26 | */ |
27 | 27 | ||
28 | using System.IO; | 28 | using System.IO; |
29 | using System.Reflection; | ||
30 | using log4net; | ||
29 | using System.Xml.Serialization; | 31 | using System.Xml.Serialization; |
30 | 32 | ||
31 | namespace OpenSim.Framework.Communications.Cache | 33 | namespace OpenSim.Framework.Communications.Cache |
32 | { | 34 | { |
33 | public class FileAssetClient : AssetServerBase | 35 | public class FileAssetClient : AssetServerBase |
34 | { | 36 | { |
35 | private readonly string m_dir; | 37 | |
38 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
39 | |||
40 | #region IPlugin | ||
41 | |||
42 | public override string Name | ||
43 | { | ||
44 | get { return "File"; } | ||
45 | } | ||
46 | |||
47 | public override string Version | ||
48 | { | ||
49 | get { return "1.0"; } | ||
50 | } | ||
51 | |||
52 | public override void Initialise(ConfigSettings p_set, string p_url) | ||
53 | { | ||
54 | m_log.Debug("[FILEASSET] Plugin configured initialisation"); | ||
55 | Initialise(p_url); | ||
56 | } | ||
57 | |||
58 | #endregion | ||
59 | |||
60 | private string m_dir; | ||
36 | private readonly XmlSerializer m_xs = new XmlSerializer(typeof(AssetBase)); | 61 | private readonly XmlSerializer m_xs = new XmlSerializer(typeof(AssetBase)); |
37 | 62 | ||
38 | public FileAssetClient(string dir) | 63 | public FileAssetClient() {} |
64 | |||
65 | public FileAssetClient(string p_url) | ||
66 | { | ||
67 | m_log.Debug("[FILEASSET] Direct constructor"); | ||
68 | Initialise(p_url); | ||
69 | } | ||
70 | |||
71 | public void Initialise(string dir) | ||
39 | { | 72 | { |
40 | if (!Directory.Exists(dir)) | 73 | if (!Directory.Exists(dir)) |
41 | { | 74 | { |