Preliminary note : I need to change return codes. In this page, you will see :
Tot | : | 256^11
|
OK | : | 3.0 x 10^25 | ( | 9.8% | )
|
W2 | : | 1.2 x 10^24 | ( | 0.4% | )
|
Err | : | 2.8 x 10^26 | ( | 89.8% | )
|
- 48 chars invalid in names (p.24)
- 2 special entries are valid : dot and dotdot (p.25)
- First char might be 0x05 (p.23), must not be 0x20 (space) (p.24)
- Inner spaces in either name or extension are valid but never used (p.29)
256 - 48 = 208 chars are valid, hence 208^11 names are valid,
plus 2 special names
However, names with spaces that aren't padding chars will generate a warning.
sum(i=0..3, 207^i) extensions are OK (only trailing spaces)
208 * sum(i=0..7, 207^i) names are OK
Better scores would be achieved using codepage information (uppercase...)
Note that these values are taking erased file names into account.
Tot | : | 256
|
OK | : | 34 | ( | 13.3% | )
|
W2 | : | 158 | ( | 61.7% | )
|
Err | : | 64 | ( | 25.0% | )
|
- 2 highest bits should be unset (p.23)
- When attributes RHSV (=LongName) are set, attributes DA must be unset
(p.26)
- When V and not RHS, D must be unset (p.33), RHSA should be unset
(p.22, p.24).
Attributes are :
- (R)ead-only
- (H)idden
- (S)ystem
- (V)olume-id
- (D)irectory
- (A)rchive
Combinations repartition :
- 32 OK combinations of R,H,S,D and A (+ 32*3 W2)
- 1 OK : V (+ 3 W2)
- 1 OK : RHSV (+ 3 W2)
- 64 Err with VD
- 14 W2 with V but not D (+ 14*3 W2)
About W2 : Nothing in the specification prevents attributes RHSA to be set
when V is set. However in that case that wouldn't be a volume name
anymore and apart RHSV combination, no other combination is defined
in the version 1.03 .
OK and W2 have the following type repartition :
- 14 + 14*3 = 56 are unknown (future expansion)
- 1 + 3 = 4 are long-name entries
- 1 + 3 = 4 are volume-id
- 16 + 16*3 = 64 are directories
- 1 = 1 is file OR linux-erased long name entry
- 15 + 16*3 = 63 are files
Tot | : | 65 536
|
OK | : | 43 200 | ( | 65.9% | )
|
Err | : | 22 236 | ( | 34.1% | )
|
OK times : 24 * 60 * 30 = 43 200
Tot | : | 65 536
|
OK | : | 46 752 | ( | 71.3% | )
|
Err | : | 18 784 | ( | 28.7% | )
|
OK dates : 365.25 * 128 - 1 (2100 isn't leap) + 1 (no date is valid) =
46 752
Tot | : | 65 536
|
OK | : | 46 751 | ( | 71.3% | )
|
Err | : | 18 785 | ( | 28.7% | )
|
OK dates : 365.25 * 128 - 1 (2100 isn't leap) = 46 751
Tot | : | 2^32
|
OK | : | 2^28-40 | ( | 6.2% | )
|
W2 | : | 4 026 531 840 | ( | 93.8% | )
|
Err | : | 40 | ( | 0.0% | )
|
- 4 higher bits should be set to 0 (p.16)
- 0x(f)f7-0x(f)ff (p.17) reserved and therefore invalid.
- 2 being the first data cluster, 1 also is invalid (p.13)
Validation is also disk-dependant, not only semantic-dependant.
All sizes might be valid.
Tot | : | 256^11
|
OK | : | 3.8 x 10^25 | ( | 12.3% | )
|
W2 | : | 8.2 x 10^20 | ( | 0.0% | )
|
Err | : | 2.7 x 10^27 | ( | 87.7% | )
|
- DIR_CrtDate and DIR_LstAccDate may be 0, DIR_WrtDate must not.
- If Time != 0, Date should be set (!=0).
- If DIR_LstAccDate is set, DIR_CrtDate should be set
Timestamps
Missing definitions
As far as I know, there are no implementations supporting last access date but not creation date.
- Tot : 2^88
- OK : 2 019 643 200 * 403 928 640 000 * 46 752 + 2 019 643 200 = 38 139 895 010 575 468 515 643 200 (12.3%)
- W2 : 2 019 643 200 * 8 639 999 * 46 752 + 2 019 643 200 * 1 * 46 751 = 815 809 180 776 476 356 800 (0.0%)
- Err : 2 275 324 096 * 2^40 * 2^16 + 2 019 643 200 * 695 574 347 776 * 2^16
+ 2 019 643 200 * (403 928 640 001 + 8 639 999) * 18784 =
271 344 299 001 588 823 732 781 056 (87.7%)
Timestamps ordering
(not yet implemented)
Last access date should me more recent than both creation and write
times. However, if a file was written on a last access supporting
system, then is modified by a last access unaware system,
that condition won't be satisfied and we will generate a W1.
Also, no assumption can be made between creation and write dates :
copying a file from one support to another will change target's
creation date, but not last write date, which is interpreted as
last modification date. Note that the specification seems to imply
the opposite :
Time of last write. Note that file creation is considered a write.
(p.23)