/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. using System;
  17. using System.IO;
  18. namespace SparkleShare {
  19. public static class Extensions {
  20. public static string Combine (this string [] parts)
  21. {
  22. string new_path = "";
  23. foreach (string part in parts)
  24. new_path = Path.Combine (new_path, part);
  25. return new_path;
  26. }
  27. }
  28. }