// define useful constant for filesystem path length.
#ifndef MAX_ABS_PATH
#ifdef __WIN32__
+ #define MAX_ABS_PATH MAX_PATH
+ #else
+ #ifdef __APPLE__
+ #include <sys/syslimits.h>
+ #else
+ #include <limits.h>
+ #endif
+ #define MAX_ABS_PATH PATH_MAX
+ #endif
+/*
+ #ifdef __WIN32__
+ // winsock support...
+// #undef FD_SETSIZE
+// #define FD_SETSIZE 1000
+ // if you don't set this, you can only select on a default of 64 sockets.
+ #include <winsock2.h>
#include <windows.h>
#define MAX_ABS_PATH MAX_PATH
#else
#endif
#define MAX_ABS_PATH PATH_MAX
#endif
+*/
#endif
-
namespace filesystem {
//! Provides operations commonly needed on file names.
/*!< the "name_of_file" can itself be a directory. */
filename(const filename &to_copy); //!< copy constructor.
+ DEFINE_CLASS_NAME("filename");
+
virtual ~filename();
bool good() const;
/*!< this means that not only was the pathname parsed and found valid,
but the file actually exists. */
+ void reset(const basis::astring &name);
+ //!< changes the file name held by the object.
+
const basis::astring &raw() const;
//!< returns the astring that we're holding onto for the path.
basis::astring &raw();