/// <summary>
 /// Creates and Opens a new file on the current file system.
 /// </summary>
 /// <returns></returns>
 public SubFileStream CreateFile(SubFileName fileName)
 {
     if (m_disposed)
     {
         throw new ObjectDisposedException(GetType().FullName);
     }
     m_fileHeaderBlock.CreateNewFile(fileName);
     return(OpenFile(fileName));
 }
        /// <summary>
        /// Creates and Opens a new file on the current file system.
        /// </summary>
        /// <returns></returns>
        public ISupportsBinaryStream CreateFile(SubFileName fileName)
        {
            if (m_disposed)
            {
                throw new ObjectDisposedException(GetType().FullName);
            }
            CloseCurrentFile();

            SubFileHeader subFile = m_fileHeaderBlock.CreateNewFile(fileName);

            subFile.DirectBlock = m_fileHeaderBlock.LastAllocatedBlock + 1;
            m_subFileStream     = new SimplifiedSubFileStream(m_stream, subFile, m_fileHeaderBlock);
            return(m_subFileStream);
        }