File size: Difference between revisions
Content added Content deleted
m (Update Lang example: Fix spelling of Lang) |
(Initial FutureBasic task solution added) |
||
Line 1,216: | Line 1,216: | ||
<syntaxhighlight lang="frink">println[newJava["java.io.File", "input.txt"].length[]] |
<syntaxhighlight lang="frink">println[newJava["java.io.File", "input.txt"].length[]] |
||
println[newJava["java.io.File", "/input.txt"].length[]]</syntaxhighlight> |
println[newJava["java.io.File", "/input.txt"].length[]]</syntaxhighlight> |
||
=={{header|FutureBasic}== |
|||
<syntaxhighlight lang="futurebasic"> |
|||
local fn DoIt |
|||
CFURLRef desktopURL = fn FileManagerURLForDirectory( NSDesktopDirectory, NSUserDomainMask ) |
|||
CFURLRef url = fn URLByAppendingPathComponent( desktopURL, @"test_file.txt" ) |
|||
CFDictionaryRef attributes = fn FileManagerAttributesOfItemAtURL( url ) |
|||
printf @"%@", fn DictionaryObjectForKey( attributes, NSFileSize ) |
|||
end fn |
|||
fn DoIt |
|||
HandleEvents |
|||
</syntaxhighlight> |
|||
{{output}} |
|||
<pre> |
|||
local fn DoIt |
|||
CFURLRef desktopURL = fn FileManagerURLForDirectory( NSDesktopDirectory, NSUserDomainMask ) |
|||
CFURLRef url = fn URLByAppendingPathComponent( desktopURL, @"test_file.txt" ) |
|||
CFDictionaryRef attributes = fn FileManagerAttributesOfItemAtURL( url ) |
|||
printf @"%@", fn DictionaryObjectForKey( attributes, NSFileSize ) |
|||
end fn |
|||
fn DoIt |
|||
HandleEvents |
|||
</pre> |
|||
=={{header|Gambas}}== |
=={{header|Gambas}}== |