~ubuntu-branches/ubuntu/oneiric/monodevelop/oneiric

« back to all changes in this revision

Viewing changes to src/core/MonoDevelop.Core/MonoDevelop.Core.FileSystem/DefaultFileSystemExtension.cs

  • Committer: Bazaar Package Importer
  • Author(s): Jo Shields
  • Date: 2011-06-27 17:03:13 UTC
  • mto: (1.8.1 upstream)
  • mto: This revision was merged to the branch mainline in revision 54.
  • Revision ID: james.westby@ubuntu.com-20110627170313-6cvz3s19x6e9hqe9
ImportĀ upstreamĀ versionĀ 2.5.92+dfsg

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
using System;
30
30
using System.IO;
31
31
using MonoDevelop.Core;
 
32
using System.Collections.Generic;
32
33
 
33
34
namespace MonoDevelop.Core.FileSystem
34
35
{
35
36
        internal class DefaultFileSystemExtension: FileSystemExtension
36
37
        {
37
 
                public override bool CanHandlePath (string path, bool isDirectory)
 
38
                public override bool CanHandlePath (FilePath path, bool isDirectory)
38
39
                {
39
40
                        return true;
40
41
                }
41
42
                
42
 
                public override void CopyFile (string source, string dest, bool overwrite)
 
43
                public override void CopyFile (FilePath source, FilePath dest, bool overwrite)
43
44
                {
44
45
                        File.Copy (source, dest, overwrite);
45
46
                }
46
47
                
47
 
                public override void RenameFile (string file, string newName)
 
48
                public override void RenameFile (FilePath file, string newName)
48
49
                {
49
50
                        File.Move (file, newName);
50
51
                }
51
52
                
52
 
                public override void MoveFile (string source, string dest)
 
53
                public override void MoveFile (FilePath source, FilePath dest)
53
54
                {
54
55
                        File.Move (source, dest);
55
56
                }
56
57
                
57
 
                public override void DeleteFile (string file)
 
58
                public override void DeleteFile (FilePath file)
58
59
                {
59
60
                        File.Delete (file);
60
61
                }
61
62
                
62
 
                public override void CreateDirectory (string path)
 
63
                public override void CreateDirectory (FilePath path)
63
64
                {
64
65
                        Directory.CreateDirectory (path);
65
66
                }
66
67
                
67
 
                public override void CopyDirectory (string sourcePath, string destPath)
 
68
                public override void CopyDirectory (FilePath sourcePath, FilePath destPath)
68
69
                {
69
70
                        CopyDirectory (sourcePath, destPath, "");
70
71
                }
71
72
                
72
 
                void CopyDirectory (string src, string dest, string subdir)
 
73
                void CopyDirectory (FilePath src, FilePath dest, FilePath subdir)
73
74
                {
74
75
                        string destDir = Path.Combine (dest, subdir);
75
76
        
83
84
                                CopyDirectory (dir, dest, Path.Combine (subdir, Path.GetFileName (dir)));
84
85
                }
85
86
                
86
 
                public override void RenameDirectory (string path, string newName)
 
87
                public override void RenameDirectory (FilePath path, string newName)
87
88
                {
88
89
                        Directory.Move (path, newName);
89
90
                }
90
91
                
91
 
                public override void MoveDirectory (string source, string dest)
 
92
                public override void MoveDirectory (FilePath source, FilePath dest)
92
93
                {
93
94
                        Directory.Move (source, dest);
94
95
                }
95
96
                
96
 
                public override void DeleteDirectory (string path)
 
97
                public override void DeleteDirectory (FilePath path)
97
98
                {
98
99
                        Directory.Delete (path, true);
99
100
                }
100
101
                
101
 
                public override bool RequestFileEdit (string file)
 
102
                public override bool RequestFileEdit (FilePath file)
102
103
                {
103
104
                        return true;
104
105
                }
105
106
                
106
 
                public override void NotifyFileChanged (string file)
 
107
                public override void NotifyFilesChanged (IEnumerable<FilePath> file)
107
108
                {
108
109
                }
109
110
        }