diff --git a/DiscImageChef.Core/ChangeLog b/DiscImageChef.Core/ChangeLog index 67a30b32..78e1d27a 100644 --- a/DiscImageChef.Core/ChangeLog +++ b/DiscImageChef.Core/ChangeLog @@ -1,3 +1,8 @@ +2017-05-27 Natalia Portillo + + * Filesystems.cs: Refactor: Move filesystem identification + code to Core. + 2017-05-27 Natalia Portillo * DiscImageChef.Core.csproj: Refactor: Move filesystem diff --git a/DiscImageChef.Core/Filesystems.cs b/DiscImageChef.Core/Filesystems.cs new file mode 100644 index 00000000..7b38c9c5 --- /dev/null +++ b/DiscImageChef.Core/Filesystems.cs @@ -0,0 +1,60 @@ +// /*************************************************************************** +// The Disc Image Chef +// ---------------------------------------------------------------------------- +// +// Filename : Filesystems.cs +// Version : 1.0 +// Author(s) : Natalia Portillo +// +// Component : Component +// +// Revision : $Revision$ +// Last change by : $Author$ +// Date : $Date$ +// +// --[ Description ] ---------------------------------------------------------- +// +// Description +// +// --[ License ] -------------------------------------------------------------- +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as +// published by the Free Software Foundation, either version 3 of the +// License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// +// ---------------------------------------------------------------------------- +// Copyright (C) 2011-2015 Claunia.com +// ****************************************************************************/ +// //$Id$ +using System; +using System.Collections.Generic; +using DiscImageChef.Filesystems; +using DiscImageChef.ImagePlugins; + +namespace DiscImageChef.Core +{ + public static class Filesystems + { + public static void Identify(ImagePlugin imagePlugin, out List id_plugins, ulong partitionStart, ulong partitionEnd) + { + id_plugins = new List(); + PluginBase plugins = new PluginBase(); + plugins.RegisterAllPlugins(); + + foreach(Filesystem _plugin in plugins.PluginsList.Values) + { + if(_plugin.Identify(imagePlugin, partitionStart, partitionEnd)) + id_plugins.Add(_plugin.Name.ToLower()); + } + } + } +}