On 12/30/2010 15:40, Devon McCormick wrote:
> Won't "fread" also return _1 for an existing file that cannot be read?
>
> fread 'C:\pagefile.sys'
> _1
...
Here is another option for Windows:
fsize 'd:\pagefile.sys'
_1
fread 'd:\pagefile.sys'
_1
fffsize'd:\pagefile.sys'
2011283456
NB. =========================================================
NB.*fffsize v get file size using windows API
NB. form: fffsize file_path_name
fffsize=: 3 : 0
'fh ft fv'=. FindFirstFile y;findd
if. INVALID_HANDLE_VALUE~:fh do.
r=. b32to64 ctoi"1]2 4$ffsize{fv
FindClose fh
else.
r=. ''
end.
r
)
--
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm