1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-01-24 12:46:02 +01:00

Add CheckFileExists function to PluginBridge

This commit is contained in:
chylex 2016-09-04 04:33:13 +02:00
parent 6dd2c6678b
commit da71f2de2b

View File

@ -92,5 +92,15 @@ public void DeleteFile(int token, string path){
fileCache.Remove(fullPath);
File.Delete(fullPath);
}
public bool CheckFileExists(int token, string path){
string fullPath = GetFullPathIfSafe(token, path);
if (fullPath == string.Empty){
throw new Exception("File path has to be relative to the plugin folder.");
}
return File.Exists(fullPath);
}
}
}