【问题标题】:syslog in NSFilemanager delegate methodNSFilemanager 委托方法中的 syslog
【发布时间】:2012-05-15 07:47:17
【问题描述】:

我正在使用copyItemAtPath:toPath:error: 方法与fileManager:shouldCopyItemAtPath:toPath:fileManager:shouldProceedAfterError:copyingItemAtPath:toPath: 进行复制操作
NSFilemanager 的委托方法。我没有从委托方法打印任何日志。

但在控制台应用程序(所有消息)上,我收到了很多日志:

reading from FilePath: Is a directory
open on FilePath: No such file or directory
open on FilePath:File exists
Cannot make directory FilePath: File exists

由于fileManager:shouldProceedAfterError:copyingItemAtPath:toPath: 委托方法,日志即将到来。
编辑:
我的应用示例:

        2534 -[NSFileManager copyItemAtPath:toPath:error:]
          2534 -[__NSOperationInternal start]
            2533 -[NSDirectoryTraversalOperation main]
              1548 -[NSFilesystemItemCopyOperation _handleFTSEntry:]
                817 setattrlist$UNIX2003
                722 copyfile
                  258 lstatx_np$INODE64
                    258 statx1
                      255 __lstat64_extended
                      2 filesec_set_property
                        2 uuid_copy
                      1 malloc
                        1 malloc_zone_malloc
                          1 szone_malloc_should_clear
                            1 tiny_malloc_from_free_list
      ...
                    7 copyfile_stat
                      3 syslog
                        3 vsyslog

copyItemAtPath:toPath:error: 正在使用syslog 打印日志。如何重定向 syslog 输出? 谁能帮帮我? Sample Application for Copy

【问题讨论】:

  • 您确定您提供了正确的 FilePath 吗?因为您似乎正在打印路径或文件扩展名不正确的日志。
  • 我正在复制文件夹,我没有打印任何日志。

标签: objective-c cocoa nsfilemanager syslog


【解决方案1】:

我收到了苹果支持的回复:

问题按预期运行。

【讨论】:

    猜你喜欢
    • 2011-01-07
    • 2011-02-13
    • 2016-11-10
    • 1970-01-01
    • 2014-03-24
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-01-30
    相关资源
    最近更新 更多