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:
parent
6dd2c6678b
commit
da71f2de2b
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user