⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 filesystemparser.cpp

📁 vc环境下的pgp源码
💻 CPP
字号:
//////////////////////////////////////////////////////////////////////////////
// FileSystemParser.cpp
//
// Implementation of class FileSystemParser.
//////////////////////////////////////////////////////////////////////////////

// $Id: FileSystemParser.cpp,v 1.6 1999/02/13 04:24:35 nryan Exp $

// Copyright (C) 1998 by Network Associates, Inc.
// All rights reserved.

#include <vtoolscp.h>

#include "Required.h"
#include "UtilityFunctions.h"

#include "FileSystemParser.h"
#include "Globals.h"


/////////////////////////////////////////////////
// Class FileSystemParser public member functions
/////////////////////////////////////////////////

// The FileSystemParser path and Volume object overloaded constructor sets
// the specified path and the specified host.

FileSystemParser::FileSystemParser(
	LPCSTR		path, 
	PGPUInt8	hostDrive, 
	PGPUInt32	bytesFile)
{
	pgpAssertStrValid(path);
	pgpAssert(IsLegalDriveNumber(hostDrive));

	mPath = NULL;
	mBytesFile = bytesFile;

	mInitErr = mHost.AttachLocalVolume(hostDrive);
	
	if (mInitErr.IsntError())
	{
		mInitErr = mHost.GetFsId(&mFsId);
	}

	if (mInitErr.IsntError())
	{
		mInitErr = SetPath(path);
	}
}

// GetPath returns a constant pointer to the pathname string.

LPCSTR FileSystemParser::GetPath()
{
	return (LPCSTR) mPath;
}

// SetPath sets the filename path variable.

DualErr 
FileSystemParser::SetPath(LPCSTR path)
{
	DualErr derr;

	ClearPath();

	derr = DupeString(path, &mPath);
	return derr;
}

// ClearPath clears the filename path variable.

void
FileSystemParser::ClearPath()
{
	if (mPath)
		delete[] mPath;

	mPath = NULL;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -