獲取本地檔案大小

2021-06-14 06:28:31 字數 732 閱讀 6150

文章**
report z_barry_test.

data: size type i.

call method cl_gui_frontend_services=>file_get_size

exporting

file_name = 『c:\fangwen.bmp』

importing

file_size = size

exceptions

file_get_size_failed = 1

cntl_error = 2

error_no_gui = 3

not_supported_by_gui = 4

others = 5 .

call method cl_gui_cfw=>flush.

write size.

***或者

data: info_obj like obj_record.

create object info_obj 『sapinfo』 no flush.

call method of info_obj 『getfilesize』 = size

exporting #1 = 『c:\fangwen.bmp』 .

write size.

獲取檔案大小

1 找到檔案所在的絕對路徑。系統路徑 projectpath request.getsession getservletcontext getrealpath 檔案路徑 在上傳檔案的時候,一定會有檔案相對路徑,如果不清楚,可以打斷點然後在本地找到此檔案。檔案相對路徑 filepath 絕對路徑rea...

VC獲取檔案大小

vc獲取檔案大小 我查到兩種方法 方法一 win32 find data fileinfo handle hfind dword filesize const char filename 檔案的路徑及名字 hfind findfirstfile filename fileinfo if hfind ...

ORACLE獲取檔案大小

set serveroutput on declare ex boolean flen number bsize number begin utl file.fgetattr oraload test.txt ex,flen,bsize if ex then dbms output.put line...