diff options
author | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-08-13 19:59:59 +0300 |
---|---|---|
committer | Tiago Conceição <Tiago_caza@hotmail.com> | 2021-08-13 19:59:59 +0300 |
commit | 3950d3e63761fc11633bf29eef8ad8a3a547caa5 (patch) | |
tree | b59a0ada5e4a75e75a13c7972c7bd2911b0c118e /UVtools.Core | |
parent | d8b83d5de25bb7aa6ca34fa662caa1c376029fa3 (diff) |
Cleanup
Diffstat (limited to 'UVtools.Core')
-rw-r--r-- | UVtools.Core/FileFormats/ChituboxFile.cs | 2 | ||||
-rw-r--r-- | UVtools.Core/FileFormats/FileFormat.cs | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/UVtools.Core/FileFormats/ChituboxFile.cs b/UVtools.Core/FileFormats/ChituboxFile.cs index 323490d..26ef761 100644 --- a/UVtools.Core/FileFormats/ChituboxFile.cs +++ b/UVtools.Core/FileFormats/ChituboxFile.cs @@ -9,7 +9,6 @@ // https://github.com/cbiffle/catibo/blob/master/doc/cbddlp-ctb.adoc using System; -using System.Buffers.Binary; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; @@ -1655,7 +1654,6 @@ namespace UVtools.Core.FileFormats { using var fs = new BinaryReader(new FileStream(fileFullPath, FileMode.Open, FileAccess.Read)); var magic = fs.ReadUInt32(); - return magic is MAGIC_CBDDLP or MAGIC_CBT or MAGIC_CBTv4; } catch (Exception e) diff --git a/UVtools.Core/FileFormats/FileFormat.cs b/UVtools.Core/FileFormats/FileFormat.cs index 40a73db..b528ccc 100644 --- a/UVtools.Core/FileFormats/FileFormat.cs +++ b/UVtools.Core/FileFormats/FileFormat.cs @@ -1957,11 +1957,16 @@ namespace UVtools.Core.FileFormats } } + /// <summary> + /// Check if a file is valid and can be processed before read it against the <see cref="FileFormat"/> decode scheme + /// </summary> + /// <param name="fileFullPath"></param> + /// <returns></returns> public virtual bool CanProcess(string fileFullPath) { if (fileFullPath is null) return false; if (!File.Exists(fileFullPath)) return false; - + //if (!IsExtensionValid(fileFullPath, true)) return false; return true; } |