protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException { if(!canWrite()) throw new IOException("Filesystem or directory is mounted read-only!");   Ext2DirectoryRecord dr; Ext2FileSystem fs = (Ext2FileSystem) getFileSystem(); try{ dr = new Ext2DirectoryRecord(fs, iNodeNr, fileType, linkName); addDirectoryRecord(dr);
protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException { if (!canWrite()) throw new IOException( "Filesystem or directory is mounted read-only!");
	protected FSEntry addINode(int iNodeNr, String linkName, int fileType) throws IOException {		if(!canWrite())			throw new IOException("Filesystem or directory is mounted read-only!");					//TODO: access rights, file type, UID and GID should be passed through the FSDirectory interface		Ext2DirectoryRecord dr;		Ext2FileSystem fs = (Ext2FileSystem) getFileSystem();				try{			dr = new Ext2DirectoryRecord(fs, iNodeNr, fileType, linkName);			addDirectoryRecord(dr);			// update the directory inode			iNode.update();								INode linkedINode = fs.getINode(iNodeNr);						linkedINode.setLinksCount( linkedINode.getLinksCount()+1 );						return new Ext2Entry(linkedINode, linkName, fileType, fs, this); 				}catch(FileSystemException fse) {			throw new IOException(fse);		}	}