mirror of
https://github.com/pocoproject/poco.git
synced 2025-12-14 12:49:59 +01:00
* chore(CppParser): 0, NULL --> nullptr * chore(Crypto): 0, NULL --> nullptr * chore(DNSSD): 0, NULL --> nullptr * chore(Encodings): 0, NULL --> nullptr * chore(CppUnit): Correct indentation. * chore(Foundation): 0, NULL --> nullptr * chore(CMake): Always warn about wrong nullptr usage when compiling with GCC or CLang * chore(Net): 0, NULL --> nullptr * chore(Foundation): 0, NULL --> nullptr * chore(Data): 0, NULL --> nullptr * chore(macOS): 0, NULL --> nullptr * chore(XML): 0, NULL --> nullptr * chore(Zip): 0, NULL --> nullptr * chore(Util): 0, NULL --> nullptr * chore(Net/NetSSL): 0, NULL --> nullptr * chore(Bonjour): 0, NULL --> nullptr * chore(MongoDB, Redis): 0, NULL --> nullptr * chore(Poco): 0, NULL --> nullptr * chore(Win32): 0, NULL --> nullptr * chore(CMake): Only warn about nullptr when verbose warnings are enabled. * Potential fix for code scanning alert no. 1634: Guarded Free Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> * chore(Net): Fix warning reported by gitlab. * chore(gitlab CI): attempt to clean to gain disk space on the runner. * chore(gitlab CI): Run build with --parallel 4, correct docker cleanup. --------- Co-authored-by: Aleksandar Fabijanic <aleks-f@users.noreply.github.com> Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
62 lines
1.3 KiB
C++
62 lines
1.3 KiB
C++
//
|
|
// FileStreamFactory.h
|
|
//
|
|
// Library: Foundation
|
|
// Package: URI
|
|
// Module: FileStreamFactory
|
|
//
|
|
// Definition of the FileStreamFactory class.
|
|
//
|
|
// Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
|
|
// and Contributors.
|
|
//
|
|
// SPDX-License-Identifier: BSL-1.0
|
|
//
|
|
|
|
|
|
#ifndef Foundation_FileStreamFactory_INCLUDED
|
|
#define Foundation_FileStreamFactory_INCLUDED
|
|
|
|
|
|
#include "Poco/Foundation.h"
|
|
#include "Poco/URIStreamFactory.h"
|
|
|
|
|
|
namespace Poco {
|
|
|
|
|
|
class Path;
|
|
|
|
|
|
class Foundation_API FileStreamFactory: public URIStreamFactory
|
|
/// An implementation of the URIStreamFactory interface
|
|
/// that handles file URIs.
|
|
{
|
|
public:
|
|
FileStreamFactory();
|
|
/// Creates the FileStreamFactory.
|
|
|
|
~FileStreamFactory() override;
|
|
/// Destroys the FileStreamFactory.
|
|
|
|
std::istream *open(const URI &uri) override;
|
|
/// Creates and opens a file stream in binary mode for the given URI.
|
|
/// The URI must be either a file URI or a relative URI reference
|
|
/// containing a path to a local file.
|
|
///
|
|
/// Throws an FileNotFound exception if the file cannot
|
|
/// be opened.
|
|
|
|
std::istream* open(const Path& path);
|
|
/// Creates and opens a file stream in binary mode for the given path.
|
|
///
|
|
/// Throws an FileNotFound exception if the file cannot
|
|
/// be opened.
|
|
};
|
|
|
|
|
|
} // namespace Poco
|
|
|
|
|
|
#endif // Foundation_FileStreamFactory_INCLUDED
|