LibPkg
filesystem.h
Go to the documentation of this file.
1 // This file is part of LibPkg.
2 // Copyright © 2003-2005 Graham Shaw.
3 // Distribution and use are subject to the GNU Lesser General Public License,
4 // a copy of which may be found in the file !LibPkg.Copyright.
5 
6 #ifndef LIBPKG_FILESYSTEM
7 #define LIBPKG_FILESYSTEM
8 
9 #include <string>
10 
11 namespace pkg {
12 
13 using std::string;
14 
19 string canonicalise(const string& pathname);
20 
28 void force_delete(const string& pathname);
29 
36 void soft_delete(const string& pathname);
37 
52 void force_move(const string& src_pathname,const string& dst_pathname,
53  bool overwrite=false);
54 
59 void copy_object(const string& src_pathname,const string& dst_pathname);
60 
64 void create_directory(const string& pathname);
65 
74 void write_file_info(const string& pathname,unsigned int loadaddr,
75  unsigned int execaddr,unsigned int attr);
76 
81 void write_filetype(const string& pathname,unsigned int filetype);
82 
87 unsigned int object_type(const string& pathname);
88 
93 unsigned int object_length(const string& pathname);
94 
99 std::string boot_drive_relative(const string& pathname);
100 
101 }; /* namespace pkg */
102 
103 #endif
unsigned int object_length(const string &pathname)
Get object length.
Definition: filesystem.cc:144
void write_filetype(const string &pathname, unsigned int filetype)
Write filetype.
Definition: filesystem.cc:130
unsigned int object_type(const string &pathname)
Get object type.
Definition: filesystem.cc:136
void copy_object(const string &src_pathname, const string &dst_pathname)
Recursively copy object.
Definition: filesystem.cc:108
std::string boot_drive_relative(const string &pathname)
Get version of pathname made relative the the boot drive.
Definition: filesystem.cc:152
void write_file_info(const string &pathname, unsigned int loadaddr, unsigned int execaddr, unsigned int attr)
Write file information.
Definition: filesystem.cc:121
void force_delete(const string &pathname)
Delete file without regard for file attributes.
Definition: filesystem.cc:29
void force_move(const string &src_pathname, const string &dst_pathname, bool overwrite)
Move file without regard for file attributes.
Definition: filesystem.cc:62
void create_directory(const string &pathname)
Create directory.
Definition: filesystem.cc:115
const char * dst_pathname
Definition: path_table.cc:20
void soft_delete(const string &pathname)
Delete file without changing file attributes It is not an error if the file does not exist...
Definition: filesystem.cc:47
const char * src_pathname
Definition: path_table.cc:19
string canonicalise(const string &pathname)
Canonicalise pathname.
Definition: filesystem.cc:13

Reference Manual LibPkg Version 0.6.1 (28 Jan 2015)