aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS_TheReturn/FileSkimmerBackend.cs
diff options
context:
space:
mode:
authorMichael <[email protected]>2017-07-17 14:34:59 -0400
committerMichael <[email protected]>2017-07-17 14:34:59 -0400
commita0ee79dbcd26a8f07d493a7e993cbaf0d02e44db (patch)
treed974220621e6cfcfe745c2825149ca370e3a7aab /ShiftOS_TheReturn/FileSkimmerBackend.cs
parente929a9f5105c00b0a3a2b4e75a876bbb95bbfa7b (diff)
downloadshiftos_thereturn-a0ee79dbcd26a8f07d493a7e993cbaf0d02e44db.tar.gz
shiftos_thereturn-a0ee79dbcd26a8f07d493a7e993cbaf0d02e44db.tar.bz2
shiftos_thereturn-a0ee79dbcd26a8f07d493a7e993cbaf0d02e44db.zip
Hacking, barebones fskimmer, double clicking
Diffstat (limited to 'ShiftOS_TheReturn/FileSkimmerBackend.cs')
-rw-r--r--ShiftOS_TheReturn/FileSkimmerBackend.cs12
1 files changed, 4 insertions, 8 deletions
diff --git a/ShiftOS_TheReturn/FileSkimmerBackend.cs b/ShiftOS_TheReturn/FileSkimmerBackend.cs
index ac20d34..b14733f 100644
--- a/ShiftOS_TheReturn/FileSkimmerBackend.cs
+++ b/ShiftOS_TheReturn/FileSkimmerBackend.cs
@@ -44,7 +44,8 @@ namespace ShiftOS.Engine
/// Opens a file from the specified ShiftFS path.
/// </summary>
/// <param name="path">The path to open.</param>
- public static void OpenFile(string path)
+ /// <returns>Whether or not the file could be opened.</returns>
+ public static bool OpenFile(string path)
{
if (!Objects.ShiftFS.Utils.FileExists(path))
throw new System.IO.FileNotFoundException("ShiftFS could not find the file specified.", path);
@@ -56,9 +57,11 @@ namespace ShiftOS.Engine
{
var obj = (IFileHandler)Activator.CreateInstance(type);
obj.OpenFile(path);
+ return true;
}
}
}
+ return false;
}
public static FileType GetFileType(string path)
{
@@ -137,11 +140,6 @@ namespace ShiftOS.Engine
_fs = fs;
}
- public static System.Drawing.Image GetImage(string filepath)
- {
- return _fs.GetImage(filepath);
- }
-
public static string GetFileExtension(FileType fileType)
{
return _fs.GetFileExtension(fileType);
@@ -153,10 +151,8 @@ namespace ShiftOS.Engine
/// </summary>
public interface IFileSkimmer
{
- void OpenFile(string filepath);
void GetPath(string[] filetypes, FileOpenerStyle style, Action<string> callback);
void OpenDirectory(string path);
- Image GetImage(string path);
string GetFileExtension(FileType fileType);
}