I would like to use C# to add a file to a library in a subsite.
SPWeb will only reference the site I am on. In an ItemAdded eventreceiver, I want to use something like
SPFolder myLibrary = web.Folders[myURL]; //this does not work. just an example
SPFile newfile = myLibrary.Files.Add(fileName, Stream, true);
but on a subsite (Event Receiver is at the top level). I have a string with a destination URL such as "mysite.com/subsite/some%20library/file.docx." Within the ER, can I open the web and and library to add the item there or do I need to split the string to get the subsite and library names each time?