public bool FileExists(string path) { try { return(NETFXCOREIOService.GetFileForPathOrURI(path) != null); } catch { return(false); } }
public void FileDelete(string path) { if (path == null) { throw new ArgumentNullException(); } if (path.Trim() == "") { throw new ArgumentException(); } try { WindowsRuntimeSystemExtensions.AsTask(NETFXCOREIOService.GetFileForPathOrURI(path).DeleteAsync()) .Wait(); } catch (Exception ex) { throw NETFXCOREIOService.GetRethrowException(ex); } }