Skip to main content

Check if there are files in the DM

You can check the file from the DM with the code at the bottom.

public void btnDosyaKontrol_OnClick(Object sender, EventArgs e)
{
eBAConnection con = CreateServerConnection();
FileSystem fs = con. FileSystem;
string path=@"Education/sample.pdf";
Try
{
Con. open();
if(!fs. HasFile(path))
{
ShowMessageBox("No file");
}
else
{
ShowMessageBox("File exists");
}
}
catch (Exception ex)
{
throw new Exception(ex. Message);
}
finally
{
Con. Close();
}
}