if(getFileSystem().isReadOnly()) { throw new ReadOnlyFileSystemException("addDirectory in readonly filesystem"); }
	public FSEntry addDirectory(String name) throws IOException {		name = name.trim();		String shortName = generateShortNameFor(name);		FatDirEntry realEntry = new FatDirEntry(this, splitName(shortName), splitExt(shortName));		final long parentCluster;		if (file == null) {			parentCluster = 0;		} else {			parentCluster = file.getStartCluster();		}		final int clusterSize = getFatFileSystem().getClusterSize();		realEntry.setFlags(FatConstants.F_DIRECTORY);		final FatFile file = realEntry.getFatFile();		file.setLength(clusterSize);		final byte[] buf = new byte[clusterSize];		// Clean the contents of this cluster to avoid reading strange data		// in the directory.		file.write(0, buf, 0, buf.length);		file.getDirectory().initialize(file.getStartCluster(), parentCluster);		LfnEntry entry = new LfnEntry(this, realEntry, name);		shortNameIndex.put(shortName, entry);		longFileNameIndex.put(name, entry);		setDirty();		flush();		return entry;	}