private void ProcessNewFile(FileCreated message) { if (!message.Path.EndsWith("zip")) return; Directory dir = new ZipFileDirectory(PathName.GetPathName(message.Path)); try { _actionToTake(dir); } catch (Exception ex) { string msg = "There was an error processing the stream package '{0}'".FormatWith(message.Path); throw new StreamPackageException(msg, ex); } }
void ProcessNewFile(FileCreated message) { if (message.Path.EndsWith("bottle")) { Directory dir = new ZipFileDirectory(PathName.GetPathName(message.Path)); try { _actionToTake(dir); } catch (Exception ex) { string msg = "There was an error processing the bottle '{0}'".FormatWith(message.Path); throw new BottleException(msg, ex); } } }
public void A_ZippedFile_Directory() { _zf = new ZipFileDirectory(new RelativePathName(_zippedFile)); }