pub unsafe trait FSVolumePathConfOperations: NSObjectProtocol {
// Provided methods
unsafe fn maximumLinkCount(&self) -> NSInteger
where Self: Sized + Message { ... }
unsafe fn maximumNameLength(&self) -> NSInteger
where Self: Sized + Message { ... }
unsafe fn restrictsOwnershipChanges(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn truncatesLongNames(&self) -> bool
where Self: Sized + Message { ... }
unsafe fn maximumXattrSize(&self) -> NSInteger
where Self: Sized + Message { ... }
unsafe fn maximumXattrSizeInBits(&self) -> NSInteger
where Self: Sized + Message { ... }
unsafe fn maximumFileSize(&self) -> u64
where Self: Sized + Message { ... }
unsafe fn maximumFileSizeInBits(&self) -> NSInteger
where Self: Sized + Message { ... }
}
FSVolume
only.Expand description
Properties implemented by volumes that support providing the values of system limits or options.
This protocol gathers properties related to the pathconf
and fpathconf
system calls.
For a file, the value of a property applies to just that file; for a directory, the value applies to all items in the directory.
Properties that represent limits and have a numeric type use -1
to represent no limit.
See also Apple’s documentation
Provided Methods§
Sourceunsafe fn maximumLinkCount(&self) -> NSInteger
unsafe fn maximumLinkCount(&self) -> NSInteger
A property that represents the maximum number of hard links to the object.
Sourceunsafe fn maximumNameLength(&self) -> NSInteger
unsafe fn maximumNameLength(&self) -> NSInteger
A property that represents the maximum length of a component of a filename.
Sourceunsafe fn restrictsOwnershipChanges(&self) -> bool
unsafe fn restrictsOwnershipChanges(&self) -> bool
A Boolean property that indicates whether the volume restricts ownership changes based on authorization.
If this value is true, the volume rejects a chown(2)
from anyone other than the superuser.
Sourceunsafe fn truncatesLongNames(&self) -> bool
unsafe fn truncatesLongNames(&self) -> bool
A property that indicates whether the volume truncates files longer than its maximum supported length.
If this value is true
, the volume truncates the filename to maximumNameLength
if the filename is longer than that.
If this value is false, the file system responds with the error code ENAMETOOLONG
if the filename is longer than maximumNameLength
.
Sourceunsafe fn maximumXattrSize(&self) -> NSInteger
unsafe fn maximumXattrSize(&self) -> NSInteger
The maximum extended attribute size in bytes.
Implement at least one of maximumXattrSize
or maximumXattrSizeInBits
.
FSKit automatically converts from one to another if needed.
If you implement both, FSKit uses only the maximumXattrSizeInBits
implementation.
Sourceunsafe fn maximumXattrSizeInBits(&self) -> NSInteger
unsafe fn maximumXattrSizeInBits(&self) -> NSInteger
The maximum extended attribute size in bits.
Implement at least one of maximumXattrSize
or maximumXattrSizeInBits
.
FSKit automatically converts from one to another if needed.
If you implement both, FSKit uses only the maximumXattrSizeInBits
implementation.
Sourceunsafe fn maximumFileSize(&self) -> u64
unsafe fn maximumFileSize(&self) -> u64
The maximum size of a regular file allowed in the volume.
Implement at least one of maximumFileSize
or maximumFileSizeInBits
.
FSKit automatically converts from one to another if needed.
If you implement both, FSKit uses only the maximumFileSizeInBits
implementation.
Sourceunsafe fn maximumFileSizeInBits(&self) -> NSInteger
unsafe fn maximumFileSizeInBits(&self) -> NSInteger
The minimum number of bits needed to represent, as a signed integer value, the maximum size of a regular file allowed in the volume.
The maximum file size is 2^(maximumFileSizeInBits - 1)
.
Maximum file size (bytes) | Maximum (in hex) | Unsigned bits | Signed bits |
---|---|---|---|
65,535 | 0xFFFF | 16 | 17 |
2,147,483,647 | 0x7FFFFFFF | 31 | 32 |
4,294,967,295 | 0xFFFFFFFF | 32 | 33 |
18,446,744,073,709,551,615 | 0xFFFFFFFFFFFFFFFF | 64 | 65 |
Implement at least one of maximumFileSize
or maximumFileSizeInBits
.
FSKit automatically converts from one to another if needed.
If you implement both, FSKit uses only the maximumFileSizeInBits
implementation.