17 de julho de 2008

Sharepoint: Easy Way to Verify If Folder Exists

public static bool ExistListFolderMonth(SPList lista, String folderYear, String folderMonth)
{
try
{
return lista.RootFolder.SubFolders[folderYear].SubFolders[folderMonth].Exists;
}
catch (Exception ex)
{
#region Error Handling

String dummy = ex.Message;
dummy = null;

return false;
#endregion
}
}

Sem comentários:

LinkWithin

Related Posts with Thumbnails