32 #if !defined (_RLD_FILES_H_)
49 typedef std::vector < std::string >
paths;
54 typedef std::vector < file >
files;
59 typedef std::map < const std::string, archive* >
archives;
64 typedef std::map < const std::string, object* >
objects;
77 std::string
basename (
const std::string& name);
85 std::string
dirname (
const std::string& name);
93 std::string
extension (
const std::string& name);
113 void path_join (
const std::string& path_,
114 const std::string& file_,
115 std::string& joined);
143 const std::string& name,
144 paths& search_paths);
162 const std::string&
oname,
227 const std::string
path ()
const;
234 const std::string
full ()
const;
241 const std::string
basename ()
const;
249 const std::string&
aname ()
const;
256 const std::string&
oname ()
const;
270 size_t size ()
const;
299 image (
const std::string&
path,
bool is_object =
true);
326 virtual void open (
bool writable =
false);
331 virtual void close ();
340 virtual ssize_t
read (
void* buffer,
size_t size);
349 virtual ssize_t
write (
const void* buffer,
size_t size);
356 virtual void seek (off_t offset);
367 virtual bool seek_read (off_t offset, uint8_t* buffer,
size_t size);
378 virtual bool seek_write (off_t offset,
const void* buffer,
size_t size);
399 virtual size_t size ()
const;
406 virtual int fd ()
const;
432 const std::string
path ()
const {
474 void copy (image& in, image& out,
size_t size);
515 bool is (
const std::string& name)
const;
538 const std::string&
get_name ()
const;
570 bool read_header (off_t offset, uint8_t* header);
580 void add_object (objects& objs,
595 void write_header (
const std::string& name,
738 virtual void open (
bool writable =
false);
743 virtual void close ();
782 virtual size_t size ()
const;
787 virtual int fd ()
const;
824 uint64_t flags_in = 0,
825 uint64_t flags_out = 0);
882 object (
const object& orig);
887 object& operator= (
const object& rhs);
921 void add (
const std::string& path);
1037 virtual void input (
const std::string& path);