added: to mount points: file systems
we have two file systems now: - simplefs - the files stored on the hard drive have the same structure as in the database (dir1/dir2/file) - hashfs - files are stored in special directories extented: the mountparser can read file system added: function download this is a default function for items which have static content git-svn-id: svn://ttmath.org/publicrep/winix/trunk@588 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -586,6 +586,28 @@ bool IsFile(const std::string & file)
|
||||
}
|
||||
|
||||
|
||||
bool CreateDir(const char * dir, int priv)
|
||||
{
|
||||
if( !IsFile(dir) )
|
||||
{
|
||||
if( mkdir(dir, priv) < 0 )
|
||||
{
|
||||
log << log1 << "Can't create a directory on fs: " << dir << logend;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool CreateDir(const std::string & dir, int priv)
|
||||
{
|
||||
return CreateDir(dir.c_str(), priv);
|
||||
}
|
||||
|
||||
|
||||
|
||||
// if there is not an extension it returns a pointer to the last '\0' character
|
||||
const char * GetFileExt(const char * name)
|
||||
{
|
||||
|
Reference in New Issue
Block a user