Fixed up File object to support better parameter options.

This commit is contained in:
Brad Arant 2024-07-09 14:29:15 -07:00
parent 7341d26852
commit 0ffc410a6a
2 changed files with 6 additions and 6 deletions

View File

@ -9,11 +9,11 @@
namespace coreutils { namespace coreutils {
File::File(std::string fileName, int mode, int authority) { // File::File(std::string fileName, int mode, int authority) {
open(fileName, mode, authority); // open(fileName, mode, authority);
} // }
File::File(coreutils::ZString &fileName, int mode, int authority) { File::File(coreutils::ZString fileName, int mode, int authority) {
open(fileName.str(), mode, authority); open(fileName.str(), mode, authority);
} }

4
File.h
View File

@ -16,8 +16,8 @@ namespace coreutils {
class File { class File {
public: public:
File(std::string fileName, int mode, int authority); // File(std::string fileName, int mode, int authority);
File(ZString &fileName, int mode = O_RDONLY, int authority = 0664); File(ZString fileName, int mode = O_RDONLY, int authority = 0664);
~File(); ~File();
void setBufferSize(size_t size); void setBufferSize(size_t size);
int read(); int read();