diff --git a/Pascal/VolumeEntry.cpp b/Pascal/VolumeEntry.cpp index 5ee5031..044744c 100644 --- a/Pascal/VolumeEntry.cpp +++ b/Pascal/VolumeEntry.cpp @@ -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 * 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) { // 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 prevBlock; diff --git a/Pascal/VolumeEntry.h b/Pascal/VolumeEntry.h index fd40240..689e081 100644 --- a/Pascal/VolumeEntry.h +++ b/Pascal/VolumeEntry.h @@ -50,11 +50,11 @@ namespace Pascal { unsigned unlink(const char *name); unsigned rename(const char *oldName, const char *newName); + unsigned copy(const char *oldName, const char *newName); FileEntry *create(const char *name, unsigned blocks); - unsigned krunch();