class EL_COPIED_FILE_DATA_TEST_SET
Client examples: COMPRESS_MANIFEST_COMMAND_TEST_SET ; COPIED_SOURCES_TEST_SET ; EIFFEL_PARSING_TEST_SET ; FILE_LOCKING_TEST_SET ; FTP_BACKUP_TEST_SET ; FTP_PROTOCOL_TEST_SET ; JOBSERVE_SEARCHER_TEST_SET ; JPEG_FILE_INFO_COMMAND_TEST_SET ; LOCALE_COMPILER_TEST_SET ; MONTHLY_STOCK_USE_TEST_SET ; PROTEIN_FOLDING_TEST_SET ; PYXIS_EIFFEL_CONFIG_TEST_SET ; PYXIS_ENCRYPTER_TEST_SET ; PYXIS_TO_XML_TEST_SET ; RSA_PUBLIC_KEY_ENCRYPTION_TEST_SET ; SIMPLE_CLIENT_SERVER_TEST_SET ; TAGLIB_TEST_SET ; VCF_CONTACT_TEST_SET ; XML_TO_PYXIS_CONVERTER_TEST_SET
Copied file data test set
note
description: "Copied file data test set"
author: "Finnian Reilly"
copyright: "Copyright (c) 2001-2022 Finnian Reilly"
contact: "finnian at eiffel hyphen loop dot com"
license: "MIT license (See: en.wikipedia.org/wiki/MIT_License)"
date: "2024-09-25 11:42:23 GMT (Wednesday 25th September 2024)"
revision: "10"
deferred class
EL_COPIED_FILE_DATA_TEST_SET
inherit
EL_FILE_DATA_TEST_SET
redefine
on_prepare
end
EL_SHARED_FIND_FILE_FILTER_FACTORY
feature {NONE} -- Events
on_prepare
local
relative_path: FILE_PATH; relative_dir: DIR_PATH
list: like source_file_list
do
Precursor
list := source_file_list
create file_list.make (list.count)
across list as path loop
relative_path := Work_area_dir.plus_file (path.item.relative_path (data_dir))
relative_dir := relative_path.parent
OS.File_system.make_directory (relative_dir)
OS.copy_file (path.item, relative_dir)
file_list.extend (relative_path)
end
end
feature {NONE} -- Implementation
source_file_list: LIST [FILE_PATH]
deferred
end
data_dir: DIR_PATH
deferred
end
new_file_digest_table: EL_HASH_TABLE [EL_BYTE_ARRAY, FILE_PATH]
do
create Result.make (file_list.count)
across file_list as list loop
Result [list.item] := Digest.md5_plain_text (list.item)
end
end
feature {NONE} -- Internal attributes
file_list: EL_FILE_PATH_LIST
end