当前位置: 首页>>代码示例>>C++>>正文


C++ ArchiveBackend类代码示例

本文整理汇总了C++中ArchiveBackend的典型用法代码示例。如果您正苦于以下问题:C++ ArchiveBackend类的具体用法?C++ ArchiveBackend怎么用?C++ ArchiveBackend使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了ArchiveBackend类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: CreateFileInArchive

ResultCode CreateFileInArchive(ArchiveHandle archive_handle, const FileSys::Path& path, u32 file_size) {
    ArchiveBackend* archive = GetArchive(archive_handle);
    if (archive == nullptr)
        return ERR_INVALID_HANDLE;

    return archive->CreateFile(path, file_size);
}
开发者ID:Glought,项目名称:citra,代码行数:7,代码来源:archive.cpp

示例2: CreateDirectoryFromArchive

ResultCode CreateDirectoryFromArchive(ArchiveHandle archive_handle, const FileSys::Path& path) {
    ArchiveBackend* archive = GetArchive(archive_handle);
    if (archive == nullptr)
        return ERR_INVALID_ARCHIVE_HANDLE;

    return archive->CreateDirectory(path);
}
开发者ID:FenrisulfrX,项目名称:citra,代码行数:7,代码来源:archive.cpp

示例3: DeleteFileFromArchive

ResultCode DeleteFileFromArchive(ArchiveHandle archive_handle, const FileSys::Path& path) {
    ArchiveBackend* archive = GetArchive(archive_handle);
    if (archive == nullptr)
        return ERR_INVALID_ARCHIVE_HANDLE;

    return archive->DeleteFile(path);
}
开发者ID:FenrisulfrX,项目名称:citra,代码行数:7,代码来源:archive.cpp

示例4: GetArchive

ResultCode ArchiveManager::CreateFileInArchive(ArchiveHandle archive_handle,
                                               const FileSys::Path& path, u64 file_size) {
    ArchiveBackend* archive = GetArchive(archive_handle);
    if (archive == nullptr)
        return FileSys::ERR_INVALID_ARCHIVE_HANDLE;

    return archive->CreateFile(path, file_size);
}
开发者ID:citra-emu,项目名称:citra,代码行数:8,代码来源:archive.cpp

示例5: CreateDirectoryFromArchive

ResultCode CreateDirectoryFromArchive(ArchiveHandle archive_handle, const FileSys::Path& path) {
    ArchiveBackend* archive = GetArchive(archive_handle);
    if (archive == nullptr)
        return ERR_INVALID_HANDLE;

    if (archive->CreateDirectory(path))
        return RESULT_SUCCESS;
    return ResultCode(ErrorDescription::NoData, ErrorModule::FS, // TODO: verify description
                      ErrorSummary::Canceled, ErrorLevel::Status);
}
开发者ID:Glought,项目名称:citra,代码行数:10,代码来源:archive.cpp

示例6: OpenFileFromArchive

ResultVal<std::shared_ptr<File>> OpenFileFromArchive(ArchiveHandle archive_handle,
                                                     const FileSys::Path& path,
                                                     const FileSys::Mode mode) {
    ArchiveBackend* archive = GetArchive(archive_handle);
    if (archive == nullptr)
        return ERR_INVALID_ARCHIVE_HANDLE;

    auto backend = archive->OpenFile(path, mode);
    if (backend.Failed())
        return backend.Code();

    auto file = std::shared_ptr<File>(new File(backend.MoveFrom(), path));
    return MakeResult<std::shared_ptr<File>>(std::move(file));
}
开发者ID:FenrisulfrX,项目名称:citra,代码行数:14,代码来源:archive.cpp

示例7: OpenDirectoryFromArchive

ResultVal<Kernel::SharedPtr<Directory>> OpenDirectoryFromArchive(ArchiveHandle archive_handle,
        const FileSys::Path& path) {
    ArchiveBackend* archive = GetArchive(archive_handle);
    if (archive == nullptr)
        return ERR_INVALID_HANDLE;

    std::unique_ptr<FileSys::DirectoryBackend> backend = archive->OpenDirectory(path);
    if (backend == nullptr) {
        return ResultCode(ErrorDescription::NotFound, ErrorModule::FS,
                          ErrorSummary::NotFound, ErrorLevel::Permanent);
    }

    auto directory = Kernel::SharedPtr<Directory>(new Directory(std::move(backend), path));
    return MakeResult<Kernel::SharedPtr<Directory>>(std::move(directory));
}
开发者ID:Glought,项目名称:citra,代码行数:15,代码来源:archive.cpp

示例8: OpenFileFromArchive

ResultVal<Kernel::SharedPtr<File>> OpenFileFromArchive(ArchiveHandle archive_handle,
        const FileSys::Path& path, const FileSys::Mode mode) {
    ArchiveBackend* archive = GetArchive(archive_handle);
    if (archive == nullptr)
        return ERR_INVALID_HANDLE;

    std::unique_ptr<FileSys::FileBackend> backend = archive->OpenFile(path, mode);
    if (backend == nullptr) {
        return ResultCode(ErrorDescription::FS_NotFound, ErrorModule::FS,
                          ErrorSummary::NotFound, ErrorLevel::Status);
    }

    auto file = Kernel::SharedPtr<File>(new File(std::move(backend), path));
    return MakeResult<Kernel::SharedPtr<File>>(std::move(file));
}
开发者ID:Glought,项目名称:citra,代码行数:15,代码来源:archive.cpp


注:本文中的ArchiveBackend类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。