mirror of
https://github.com/QL-Win/QuickLook.git
synced 2025-09-11 17:59:17 +00:00
Added EPUB plugin
This commit is contained in:
32
QuickLook.Plugin/VersOne.Epub/Utils/ZipPathUtils.cs
Normal file
32
QuickLook.Plugin/VersOne.Epub/Utils/ZipPathUtils.cs
Normal file
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
|
||||
namespace VersOne.Epub.Internal
|
||||
{
|
||||
internal static class ZipPathUtils
|
||||
{
|
||||
public static string GetDirectoryPath(string filePath)
|
||||
{
|
||||
int lastSlashIndex = filePath.LastIndexOf('/');
|
||||
if (lastSlashIndex == -1)
|
||||
{
|
||||
return String.Empty;
|
||||
}
|
||||
else
|
||||
{
|
||||
return filePath.Substring(0, lastSlashIndex);
|
||||
}
|
||||
}
|
||||
|
||||
public static string Combine(string directory, string fileName)
|
||||
{
|
||||
if (String.IsNullOrEmpty(directory))
|
||||
{
|
||||
return fileName;
|
||||
}
|
||||
else
|
||||
{
|
||||
return String.Concat(directory, "/", fileName);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user