@Override
	public Iterable<EntityInfo> listDirectory(String path)
			throws NotADirectoryException, PathNotFoundException {
		File dir = getFile(path);
		if (!dir.exists())
			throw new PathNotFoundException(path);
		if (!dir.isDirectory())
			throw new NotADirectoryException();
		
		File[] files = dir.listFiles();
		List<EntityInfo> infos;
		if (files == null)
		{
			return new ArrayList<EntityInfo>();
		}
		else
			infos = new ArrayList<EntityInfo>(files.length);
		for (File file : files)
		{
			if (file.isDirectory())
				infos.add(new DirectoryInfo(translateFilePath(file)));

			if (file.isFile())
				infos.add(new FileInfo(translateFilePath(file), file.length()));
		}
		return infos;
	}