【问题标题】:How to get the file size pointed by a Windows shortcut under MinGW?如何获取MinGW下Windows快捷方式指向的文件大小?
【发布时间】:2013-07-12 00:58:34
【问题描述】:

我想获取 MinGW/GLib 下的 Windows 快捷方式 lnk 文件(不是文件连接/符号链接)指向的文件大小。 GLib 中的g_stat 函数告诉我文件或文件连接的大小,但不告诉我lnk 文件指向的文件的大小。有人可以帮我吗?

【问题讨论】:

    标签: c mingw glib


    【解决方案1】:

    您应该改用g_lstat (see here)

    【讨论】:

    • g_lstat 在这里对我没用。我想要的是实际文件的大小,而不是链接的大小,这就是 g_lstat 的用途。 The lstat() function is like stat() except that in the case of symbolic links, it returns information about the symbolic link itself and not the file that it refers to
    猜你喜欢
    • 2021-05-22
    • 2015-05-08
    • 2021-06-11
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多