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:
@@ -2,7 +2,7 @@
|
||||
* This file is a part of CMSLU -- Content Management System like Unix
|
||||
* and is not publicly distributed
|
||||
*
|
||||
* Copyright (c) 2009, Tomasz Sowa
|
||||
* Copyright (c) 2010, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
*/
|
||||
@@ -245,6 +245,30 @@ void MountParser::ReadMountPoint()
|
||||
|
||||
|
||||
|
||||
void MountParser::ReadFs()
|
||||
{
|
||||
ReadWord(temp);
|
||||
|
||||
if( temp == "simplefs" )
|
||||
{
|
||||
mount.fs = Mount::simplefs;
|
||||
log << log1 << "MP: file system: simplefs" << logend;
|
||||
}
|
||||
else
|
||||
if( temp == "hashfs" )
|
||||
{
|
||||
mount.fs = Mount::hashfs;
|
||||
log << log1 << "MP: file system: hashfs" << logend;
|
||||
}
|
||||
else
|
||||
{
|
||||
err = Error::unknown_filesystem;
|
||||
log << log1 << "MP: unknown filesystem: " << temp << logend;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MountParser::LogMountParams()
|
||||
{
|
||||
size_t i;
|
||||
@@ -263,6 +287,7 @@ size_t i;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void MountParser::ReadMountParams()
|
||||
{
|
||||
mount.ClearParams();
|
||||
@@ -300,6 +325,9 @@ void MountParser::ReadRow(std::map<long, Mount> & output)
|
||||
if( err == Error::ok )
|
||||
ReadMountPoint();
|
||||
|
||||
if( err == Error::ok )
|
||||
ReadFs();
|
||||
|
||||
if( err == Error::ok )
|
||||
ReadMountParams();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user