Shaka Packager SDK
Loading...
Searching...
No Matches
packager
file
file_closer.h
1
// Copyright 2014 Google LLC. All rights reserved.
2
//
3
// Use of this source code is governed by a BSD-style
4
// license that can be found in the LICENSE file or at
5
// https://developers.google.com/open-source/licenses/bsd
6
7
#ifndef MEDIA_FILE_FILE_CLOSER_H_
8
#define MEDIA_FILE_FILE_CLOSER_H_
9
10
#include <cstddef>
11
#include <string>
12
13
#include <absl/log/log.h>
14
15
#include <packager/file.h>
16
17
namespace
shaka
{
18
21
struct
FileCloser
{
22
inline
void
operator()(File* file)
const
{
23
if
(file != NULL) {
24
const
std::string filename = file->file_name();
25
if
(!file->Close()) {
26
LOG(WARNING) <<
"Failed to close the file properly: "
<< filename;
27
}
28
}
29
}
30
};
31
32
}
// namespace shaka
33
34
#endif
// MEDIA_FILE_FILE_CLOSER_H_
shaka
All the methods that are virtual are virtual for mocking.
Definition
cpix_encryption_flags.cc:51
shaka::FileCloser
Definition
file_closer.h:21
Generated on Mon Jul 27 2026 18:29:59 for Shaka Packager SDK by
1.9.8