public FSEntry addDirectory(String name) throws IOException {
NFS2Client nfsClient = getNFS2Client();
CreateDirectoryResult result;
try {
result = nfsClient.createDirectory(directoryEntry.getFileHandle(), name,
DEFAULT_PERMISSION, -1, -1, -1, new Time(-1, -1), new Time(-1, -1));
} catch (NFS2Exception e) {
throw new IOException("Can not create the directory " + name + "." + e.getMessage(), e);
}
NFS2Entry entry =
new NFS2Entry((NFS2FileSystem) getFileSystem(), this, name, result.getFileHandle(),
result.getFileAttribute());
tableEntry.addEntry(entry);
return entry;
}