Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create FileSys.h #55

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
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 );
};
}
}