【问题标题】:Filemaker Pro 9 (Mac) : How do I get it to deal with absolute paths?Filemaker Pro 9 (Mac):如何让它处理绝对路径?
【发布时间】:2010-05-21 04:22:26
【问题描述】:

我有一个安装,其中 FM Pro 9 客户端从 FM Server 9 打开一个解决方案。

然后,此解决方案需要从客户端访问网络共享上的文件。到目前为止,网络共享是使用 AFP 挂载的,但是基础架构更改需要将其切换到静态 NFS 挂载。

它们的引导卷可能有不同的名称,但它们都将 NFS 共享挂载在“真实”挂载树中的同一挂载点(从 UNIX 根目录 / 开始)。

根据http://www.filemaker.com/help/html/create_db.8.32.html#1030283,似乎没有办法只使用完整路径而没有卷名,就好像这是 Mac OS 经典 - 有没有办法解决这个问题?

升级到较新的 FileMaker 不是一个寻求的解决方案。

【问题讨论】:

    标签: macos filemaker


    【解决方案1】:

    如果你够聪明的话,你可以找到默认的卷名。以下代码(您可以在脚本或自定义函数中使用)将允许您将变量设置为所需的文件。

    Let([
        desktop_path = Get(DesktopPath);
        second_slash = Position (desktop_path ; "/" ; 1 ; 2 );
        volume = Middle(desktop_path; 2; second_slash - 2)
    ];
    "filemac:/" & volume & "/path_to_share/file.xls"
    )
    

    在我的机器上,我的启动卷是“Macbook Pro HD”。调用这段代码的结果返回:

    filemac:/Macbook Pro HD/path_to_share/file.xls
    

    这允许我访问该文件。

    如果由于某种原因 DesktopPath 不在启动卷上,以下 Get 函数可能会派上用场:

    Get(DocumentsPath) -- returns the path to the users Documents folder  
    Get(FileMakerPath) -- returns the path to the folder of the currently 
                          running version of FileMaker
    

    【讨论】:

      【解决方案2】:

      所有 FileMaker 文件引用都以 /Volumes 静默开始,这就是它们包含卷名的原因。要访问不同卷上的文件X,请使引用看起来像filemac:/X/directoryName/fileName

      【讨论】:

        猜你喜欢
        • 2012-09-23
        • 2015-03-27
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-06-30
        • 2016-04-11
        相关资源
        最近更新 更多