1 // FileTypeCommand.cpp: implementation of the CFileTypeCommand class.
3 //////////////////////////////////////////////////////////////////////
6 #include "FileTypeCommand.h"
8 #include <SSPhysLib\SSFiles.h>
9 #include <SSPhysLib\SSItemInfoObject.h>
11 //////////////////////////////////////////////////////////////////////
12 // Construction/Destruction
13 //////////////////////////////////////////////////////////////////////
15 //---------------------------------------------------------------------------
16 CFileTypeCommand::CFileTypeCommand ()
17 : CCommand ("filetype")
21 COptionInfoList
CFileTypeCommand::GetOptionsInfo () const
23 COptionInfoList options
= CCommand::GetOptionsInfo();
27 bool CFileTypeCommand::SetOption (const COption
& option
)
32 bool CFileTypeCommand::SetArguments (CArguments
& args
)
35 throw SSException ("no argument");
37 m_PhysFile
= args
.front ();
42 void CFileTypeCommand::Execute ()
44 SSHistoryFile
file (m_PhysFile
);
45 std::auto_ptr
<SSItemInfoObject
> info (file
.GetItemInfo ());
47 g_pFormatter
->Format (*info
);