Programmer's Reference

File name length

The maximumFilenameLength method answers the maximum length, in bytes, which the volume allows for file names and path components. Examples are as follows:

"Answer the maximumFilenameLength for the default volume,
or a CfsError if it cannot be obtained."
| volInfo |
volInfo := CfsVolumeInfo volumeInfo: CfsDirectoryDescriptor getcwd.
^volInfo isCfsError
 ifTrue: [volInfo]
 ifFalse: [volInfo maximumFilenameLength].
 
"Answer the maximumFilenameLength, ignoring any error."
| volInfo |
(volInfo := CfsVolumeInfo new) volumeInfo: CfsDirectoryDescriptor getcwd.
^volInfo maximumFilenameLength.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]