LocalFileSystem localFs = FileSystem.getLocal(conf);
int count = 0;
final FileStatus itemStatus = localFs.getFileStatus(itemToZip);
if(itemStatus.isDir()) {
final FileStatus[] statai = localFs.listStatus(itemToZip);
// Add a directory entry to the zip file
final String zipDirName = relativePathForZipEntry(itemToZip.toUri().getPath(), baseName, root);
final ZipEntry dirZipEntry = new ZipEntry(zipDirName + Path.SEPARATOR_CHAR);
LOG.info(String.format("Adding directory %s to zip", zipDirName));