aboutsummaryrefslogtreecommitdiffstats
path: root/lib/plpdirent.cc
diff options
context:
space:
mode:
authorFritz Elfert <felfert@to.com>2001-02-01 22:23:42 +0000
committerFritz Elfert <felfert@to.com>2001-02-01 22:23:42 +0000
commit4da48658c8f1dfbf5960bb1768dc6d154c528734 (patch)
treea8a68ce884fe90be6cfcb7c09ba9c40ec86639f6 /lib/plpdirent.cc
parent922027d66d65c570960234d9f5c32467b487715d (diff)
downloadplptools-4da48658c8f1dfbf5960bb1768dc6d154c528734.tar.gz
plptools-4da48658c8f1dfbf5960bb1768dc6d154c528734.tar.bz2
plptools-4da48658c8f1dfbf5960bb1768dc6d154c528734.zip
Added in missing plpdirent.cc
Added a small description of the KDE stuff in README Small fixes in rfsv16 and ppsocket.
Diffstat (limited to 'lib/plpdirent.cc')
-rw-r--r--lib/plpdirent.cc66
1 files changed, 66 insertions, 0 deletions
diff --git a/lib/plpdirent.cc b/lib/plpdirent.cc
new file mode 100644
index 0000000..345eac6
--- /dev/null
+++ b/lib/plpdirent.cc
@@ -0,0 +1,66 @@
+#include <plpdirent.h>
+#include <stream.h>
+#include <iomanip>
+
+PlpDirent::PlpDirent(const PlpDirent &e) {
+ size = e.size;
+ attr = e.attr;
+ time = e.time;
+ memcpy(uid, e.uid, sizeof(uid));
+ name = e.name;
+ attrstr = e.attrstr;
+}
+
+long PlpDirent::
+getSize() {
+ return size;
+}
+
+long PlpDirent::
+getAttr() {
+ return attr;
+}
+
+long PlpDirent::
+getUID(int uididx) {
+ if ((uididx >= 0) && (uididx < 4))
+ return uid[uididx];
+ return 0;
+}
+
+const char *PlpDirent::
+getName() {
+ return name.c_str();
+}
+
+PsiTime PlpDirent::
+getPsiTime() {
+ return time;
+}
+
+void PlpDirent::
+setName(const char *str) {
+ name = str;
+}
+
+PlpDirent &PlpDirent::
+operator=(const PlpDirent &e) {
+ size = e.size;
+ attr = e.attr;
+ time = e.time;
+ memcpy(uid, e.uid, sizeof(uid));
+ name = e.name;
+ attrstr = e.attrstr;
+ return *this;
+}
+
+ostream &
+operator<<(ostream &o, const PlpDirent &e) {
+ ostream::fmtflags old = o.flags();
+
+ o << e.attrstr << " " << dec << setw(10)
+ << setfill(' ') << e.size << " " << e.time
+ << " " << e.name;
+ o.flags(old);
+ return o;
+}