Cocoa 检测被拖动项目的路径

Cocoa 检测被拖动项目的路径,cocoa,Cocoa,如何检测被拖动项目(文件或文件夹)的路径 当将此路径放置在某个区域时,是否可以抓住它?有关介绍,请参阅。删除文件时,您将从粘贴板接收一组文件。示例摘录如下: - (BOOL)performDragOperation:(id <NSDraggingInfo>)sender { NSPasteboard *pboard; NSDragOperation sourceDragMask; sourceDragMask = [sender draggi

如何检测被拖动项目(文件或文件夹)的路径

当将此路径放置在某个区域时,是否可以抓住它?

有关介绍,请参阅。删除文件时,您将从粘贴板接收一组文件。示例摘录如下:

- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender {    
    NSPasteboard *pboard;    
    NSDragOperation sourceDragMask;

    sourceDragMask = [sender draggingSourceOperationMask];    
    pboard = [sender draggingPasteboard];

    if ( [[pboard types] containsObject:NSFilenamesPboardType] ) {
        NSArray *files = [pboard propertyListForType:NSFilenamesPboardType];
        // ...
-(BOOL)performDragOperation:(id)发送方{
NSPasteboard*pboard;
NSDRAGO操作源DRAGMASK;
sourceDragMask=[sender DragingSourceOperationMask];
pboard=[发送方拖动粘贴板];
if([[pboard types]包含对象:NSFilenamesPboardType]){
NSArray*文件=[pboard propertyListForType:NSFilenamesPboardType];
// ...

我想处理路径根目录下的数据。不过,我刚才误读了这个问题。