TrFile_GetResForkSize |
Returns the size of the resource fork for the file specified by the filePath. The size indicates the actual number of bytes used by the resource fork.
Syntax
TrFile_GetResForkSize ( switches ; filePath )
Parameters
switches | not used, reserved for future use. Leave blank or put "-Unused" |
filePath | the path to the file for which you want the information |
Returned Result
Data type returned
Number
Result
The size (in bytes) of the resource fork of the file specified. On Mac a file can have a data fork and also a resource fork. In this fork resources, like for example pictures are stored.
Originated in
Troi File Plug-in 1.0
Compatibility
FileMaker Pro 17 to FileMaker Pro 21 (2024)
Considerations
This function is not available in Windows.
Example
Assume there is a file “Read me.txt” with the text “Hello!” in it. Then:
Set Field [ MyTextField ; TrFile_GetResForkSize ( "-Unused" ; "Disk:Read me.txt" ) ]
might return 453 which is the size of the resource fork.
Example 2
We assume that in your FileMaker file the following fields are defined:
gFileSpec Global, text
gSize Global, number
gFileSpec should contain the path to an existing file, for example “Mac HD:Readme.txt”. In a script add the following scriptstep:
Set Field [ gSize ; TrFile_GetResForkSize ( "-Unused" ; gFileSpec ) ]
This will fill gSize with the resource fork size of the file.
Used in example file
DataIn.fmp12
Related functions
TrFile_GetDataSize |
TrFile_GetFileSize |
TrFile_SelectFileDialog |
Related topics
Troi File Plug-in online help (overview)