Skip to content
Draft
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions Standards/CCSMB-X.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# CCSMB-X: Virtual File System Archive

*Author: walksanator (Walker Fowlkes)*

*Version: 1.0.*

*Last revised: 2023-01-DD*

## Quick information

| Information | |
| ----------- | -----------------------------|
| Version | 1.0.9 |
| Author | walksanator (Walker Fowlkes) |
| Type | Virtual File System Archiv |
Comment thread
walksanatora marked this conversation as resolved.
Outdated
| MIME | `appilcation/vfs` |
| Extensions | `.vfs` |

## Technical details

The VFS file format is a text-based format that represents folder(s) as a Lua table
where the keys of the table are used as file names and values are used for contents.
Directories in VFS are tables, whereas files have their contents embedded as strings.
VFS files should be read and written in binary mode as to prevent converting binary characters to `?`.
VFS archives do not store metadata, programs that need things like modification times will need to seek a alternative.

## Examples included
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd recommend having the examples embedded inline with descriptions of what they do. This makes it easier to read quickly.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it is a full program, or should i have the Examples section contains example functions for creating/extracting (the gen_disk and unpack_vfs functions) along wit a small text example
and have the full example program and example image in the folder

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You shouldn't be posting the full program here - put that on your own repo and link to it as an additional example. The examples here should be limited to single functions that demonstrate just one part at a time.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so should i embed the example functions i use to create/unpack the archive with comments
but just those functions
and include a simpler example since having a folder and 1 lua script and a 18kb text file is a bit mutch

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, but try to make them as simple and easy to read as possible (e.g. assume the file's correct, no error checking).

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thats what they do allready
i do all the error checking outside of the functions anyway

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think it is better now


In the CCSMB-X folder there is a [example tool](./CCSMB-X/vfstool.lua) for creating and extracting archive
and a [example archive](./CCSMB-X/Example1.vfs) containg a _G dumper script in a folder named "empty" and it's output
Loading