code: @Override
      public FatLfnDirectoryEntry addFile(String name) throws IOException {
          checkWritable();
          checkUniqueName(name);
          
          name = name.trim();
          final ShortName sn = makeShortName(name);
          
          final FatLfnDirectoryEntry entry =
                  new FatLfnDirectoryEntry(name, sn, this, false);
  
          dir.addEntries(entry.compactForm());
          
          shortNameIndex.put(sn, entry);
          longNameIndex.put(name.toLowerCase(Locale.ROOT), entry);
  
          getFile(entry.realEntry);
          
          dir.setDirty();
          return entry;
      }
docs: <p>
  {@inheritDoc}
  </p><p>
  According to the FAT file system specification, leading and trailing
  spaces in the {@code name} are ignored by this method.
  </p>
  
  @param name {@inheritDoc}
  @return {@inheritDoc}
  @throws IOException {@inheritDoc}