Implement a file system (FS) based on a single file (all data must be stored within a single file):
There should be support for at least:
-
creating
-
reading
-
deleting
-
updating files
-
There should be a documented API for working with the file system -- etc/fs_arch.drawio
-
The code must be close to production quality, including tests.
-
For implementation, please use Java
-
Preferably, please do not use any third-party libraries for the implementation of file storage itself.
-
Q-1. Will it be enough to provide just a Java interface with Javadoc or do I need to provide an OpenAPI contract? It would be great to see a console app, but Java interface with Javadoc will be sufficient
-
Q-2. Do I need to optimize the space used when deleting a file? It’s up to you if you want to optimize the used space
-
Q-3. Should the file system be created with a specific size or unlimited? File system should not have a hard size limit but let’s assume that users won’t stress it beyond some reasonable limits
-
Q-4. The result should be a mini library? Or assume it's part of the application, and I can use spring and so on? It would be great to see a console app, but Java interface with Javadoc will be sufficient
-
Q-5. Should the file system be hierarchical? Up to me
-
Q-6. Fast write or fast read? As for the fast write/fast read - let’s assume that we want balance between reads and writes
-
T-0. Base project template
-
T-1. Creating FS file
-
T-4. Store metadata in FS
-
T-5. Reading blocks
-
T-6. Write data in block
-
T-9. Refactor file system creation
-
T-12. Writing data - Serializing File descriptors
-
T-10. Writing data - Write file descriptor in descriptors block
-
T-13. Refactor entire project
-
T-14. Find the best block for filling a data
-
T-11. Writing data - Write file data in available place
-
T-15. Writing data - Write big file
-
T-16. Save a block size of the FS in metadata
-
T-3. Reading files in FS
-
T-17. Delete file in FS
-
T-18. Update file in FS
-
T-19. Refactor entire project
-
P-6. update does not remove index blocks when compressing a file
-
P-1. Two files with same name problem
-
P-4. Allocated space offset validation
-
T-21. Write more tests
-
T-22. Write more documentation
-
T-25. Extract ChainedFileDescriptorsBlock from MyFileSystemOperations
-
T-26. Refactor MyFileSystemOperations
-
T-23. Wrap it in console app
-
T-28. Wrap all IOException
-
FR-4. List files in fs
-
P-7. block occupancy is not taken into account during expansion
-
T-29. Extract interfaces
-
T-27. Exception handling in ArgumentsApi
-
T-30. Refactor exceptions
-
P-9. Do not read the last block completely with null bytes
-
FR-7. Checksum file
-
P-10. Incorrectly handled exception in ArgumentsParser
-
T-31. Write documentation of the memory organization
-
FR-6. Move the file
-
T-32. Write more tests for ArgumentsApi
-
T-33. Update arguments_help.md
-
T-34. Wrap the application in an executable file
-
P-11. Limit filename size
-
T-35. Refactor requests package
-
T-36. Check the resources to be closed
-
T-24. Check speed of RW-operations
-
P-2. FS initial max size is only 2GB
-
P-5. readBlocks can not allocate more than Integer.MAX bytes
-
P-8. Primitive collections are not used
-
T-20. Work with different block sizes
-
FR-1. Compress data
-
FR-2. Encrypt data
-
FR-3. Defragmentation
-
FR-5. Implement FileSystemProvider