Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions Include/7zpp/FileSys.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#pragma once


#include <vector>
#include "FileInfo.h"


namespace SevenZip
{
namespace intl
{
class FileSys
{
public:

static TString GetPath( const TString& filePath );
static TString GetFileName( const TString& filePathOrName );
static TString AppendPath( const TString& left, const TString& right );
static TString ExtractRelativePath( const TString& basePath, const TString& fullPath );

static bool DirectoryExists( const TString& path );
static bool IsDirectoryEmptyRecursive( const TString& path );

static bool CreateDirectoryTree( const TString& path );

static std::vector< FilePathInfo > GetFile(const TString& filePathOrName, bool absolutePath = false);
static std::vector< FilePathInfo > GetFilesInDirectory( const TString& directory, const TString& searchPattern, const TString& pathPrefix, bool recursive );

static CComPtr< IStream > OpenFileToRead( const TString& filePath );
static CComPtr< IStream > OpenFileToWrite( const TString& filePath );
};
}
}