Will this work or break if fileUrl is blank or does not even exists?
SPFile file = web. GetFile (fileUrl);
if (file == null)
{
file.delete()
}
|
Will this work or break if fileUrl is blank or does not even exists?
|
||||
|
|
|
Use the exists property instead of null, GetFile method doesn't return null if file doesn't exist
|
||||
|
|