PageRenderTime 26ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 2ms app.codeStats 0ms

/SparkleShare/SparkleExtensions.cs

http://github.com/hbons/SparkleShare
C# | 35 lines | 13 code | 7 blank | 15 comment | 0 complexity | 4f98d9514eb93bcd634be597c6ef02b3 MD5 | raw file
 1//   SparkleShare, a collaboration and sharing tool.
 2//   Copyright (C) 2010  Hylke Bons (hylkebons@gmail.com)
 3//
 4//   This program is free software: you can redistribute it and/or modify
 5//   it under the terms of the GNU General Public License as published by
 6//   the Free Software Foundation, either version 3 of the License, or
 7//   (at your option) any later version.
 8//
 9//   This program is distributed in the hope that it will be useful,
10//   but WITHOUT ANY WARRANTY; without even the implied warranty of
11//   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12//   GNU General Public License for more details.
13//
14//   You should have received a copy of the GNU General Public License
15//   along with this program. If not, see (http://www.gnu.org/licenses/).
16
17
18using System;
19using System.IO;
20
21namespace SparkleShare {
22
23    public static class Extensions {
24
25        public static string Combine (this string [] parts)
26        {
27            string new_path = "";
28
29            foreach (string part in parts)
30                new_path = Path.Combine (new_path, part);
31
32            return new_path;
33        }
34    }
35}