git-svn-id: https://profuse.googlecode.com/svn/branches/v2@295 aa027e90-d47c-11dd-86d7-074df07e0730

This commit is contained in:
ksherlock 2010-05-29 18:12:32 +00:00
parent 9098a442c9
commit 126327d019
2 changed files with 24 additions and 2 deletions

View File

@ -376,11 +376,29 @@ unsigned VolumeEntry::rename(const char *oldName, const char *newName)
} }
/*
* copy a file (here to simplify copying text files).
* if newName exists, delete it.
*
*/
unsigned VolumeEntry::copy(const char *oldName, const char *newName)
{
return 0;
}
/* /*
* create a file. if blocks is defined, verifies the file could * create a file. if blocks is defined, verifies the file could
* expand to fit. * expand to fit.
* *
*/ */
/*
* TODO -- if blocks is defined, try to fit in a gap rather than putting at the end.
*
*
*
*/
FileEntry *VolumeEntry::create(const char *name, unsigned blocks) FileEntry *VolumeEntry::create(const char *name, unsigned blocks)
{ {
// 0. check read only access. // 0. check read only access.
@ -464,7 +482,11 @@ FileEntry *VolumeEntry::create(const char *name, unsigned blocks)
/*
* TODO -- consider trying to move files from the end to fill gaps
* if it would reduce the number of blocks that need to be re-arranged.
*
*/
unsigned VolumeEntry::krunch() unsigned VolumeEntry::krunch()
{ {
unsigned prevBlock; unsigned prevBlock;

View File

@ -50,11 +50,11 @@ namespace Pascal {
unsigned unlink(const char *name); unsigned unlink(const char *name);
unsigned rename(const char *oldName, const char *newName); unsigned rename(const char *oldName, const char *newName);
unsigned copy(const char *oldName, const char *newName);
FileEntry *create(const char *name, unsigned blocks); FileEntry *create(const char *name, unsigned blocks);
unsigned krunch(); unsigned krunch();