2 using System.Collections.Generic;
3 using System.ComponentModel.Composition;
4 using System.Diagnostics;
8 using Pithos.Interfaces;
10 namespace Pithos.ShellExtensions
13 public class FileContext
16 public IPithosSettings Settings { get; set; }
19 public IStatusChecker StatusChecker { get; set; }
21 public string PithosPath { get { return Settings.PithosPath.ToLower(); } }
28 Trace.Write(String.Format("Managed path is {0}\r\n Current Path is {1}", PithosPath, CurrentFile));
29 return CurrentFolder.StartsWith(PithosPath, true, null);
33 public bool IsFolder { get; set; }
34 private string _currentFolder;
35 public string CurrentFolder
37 get { return _currentFolder; }
40 _currentFolder = value.ToLower();
42 _currentFile = _currentFolder;
46 private string _currentFile;
47 public string CurrentFile
49 get { return _currentFile; }
52 _currentFile = value.ToLower();
53 Trace.Write(String.Format("File is {0}", _currentFile));
54 if (Directory.Exists(_currentFile))
56 _currentFolder = _currentFile;
61 _currentFolder = Path.GetDirectoryName(_currentFile);