如何在 Windows 8 中使用在 Mac 上创建的重用软链接 [英] How to use reuse softlinks created on Mac in Windows 8

查看:34
本文介绍了如何在 Windows 8 中使用在 Mac 上创建的重用软链接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的软链接很少,上面写着我在 MacBook Pro 中创建的 1000 张图片,我在我的 iOS 应用程序中使用了这些图片.

I have few softlinks, says 1000 images which i have created in MacBook Pro which i am using in my iOS Apps.

现在我要在 Windows 8 手机应用程序中移植相同的应用程序,所以我也想在 Windows 手机 8 应用程序中重复使用相同的软链接,那么我该如何使用它?

Now i am porting the same app in Windows 8 phone app, so i want to reuse the same Softlink in Windows phone 8 apps as well, so how can i use that ?

我尝试在 Windows 8 机器上打开软链接,但它说不支持文件格式".

I have tried to open the softlink in Windows 8 machine, but it says that the "File format is not supported".

我的 Windows 机器中有原始文件和软链接.

I have both the original file and the softlink in my Windows machine.

有没有其他方法可以重复使用相同的软链接?如果不是,我可以遵循的最佳方法是什么.

Is there anyother way that i can reuse the same soft link ? if NOT what is the best approach that i can follow.

编辑

好的,这里有更多关于此的信息:

Ok, here is some more info on this :

在 MacBook Pro 中

我在桌面上有一个文件夹,它有物理路径(实际图像),现在我使用脚本创建了软链接,这些软链接被放置在一些不同的文件夹中.

I have a folder in desktop which has physical paths (actual images), now i have created softlinks using a script and these softlinks are placed in some different folder.

现在我在我的 iOS 应用中使用这些软链接.

Now i am using these soflinks in my iOS app.

在 Windows 8 中

我已经从 Mac 复制了包含 soflink 的文件夹以及包含实际文件的文件夹.

I have copied the folder which has soflink as well as the folder which has actual files in it from Mac.

现在我已经在我的桌面上粘贴了实际文件夹和一些 D: 驱动器中的 soflinks 文件夹,如果我现在将我的 soflink 文件夹放在 D 驱动器中,当我检查这些图像时,它显示为空白,因为它没有指向实际文件.

Now i have pasted actual files folder on my desktop and soflinks folder in some D: drive now if i go my soflink folder in D drive and when i check those images it shows blank, because its not pointing to the actual files.

我既有实际的文件夹,也有 soflink 文件夹.

I have both actual files folder and also the soflink folder.

还有一点是,当你创建一个软链接时,在 MacBook Pro 中它会显示这个图标:

One more point is that when you create a soflink, in MacBook Pro it shows this icon :

但在 Windows 8 上它是空白的.

But on Windows 8 its blank nothing like that.

推荐答案

您的问题缺少一些细节,所以我将不得不猜测您的情况.问题是:

Your question is missing a couple of details so I'm going to have to make a guess about your situation. The problem is:

您在文件系统上使用 OS X 创建了一些符号链接,现在您是在 Windows 中访问这些符号链接时遇到问题.

You created some symlinks using OS X on a file system and now you are having problems accessing those symlinks in Windows.

除非你做了一些棘手的事情,比如安装 3rd 方文件系统驱动程序,否则 Windows 和 OS X 可以读取/写入的唯一文件系统是基于 FAT 的.所以我猜你的情况是:

Unless you did something tricky, like installing 3rd party file system drivers, then the only file system that both Windows and OS X can read/write to natively is FAT based. So I'm guessing your situation is:

您在 FAT32 文件系统上使用 OS X 创建了一些符号链接,现在您在 Windows 中访问这些符号链接时遇到问题.

You created some symlinks using OS X on a FAT32 file system and now you are having problems accessing those symlinks in Windows.

假设上述情况,问题是FAT32中没有符号链接,因为文件系统不支持它们.OS X 正在欺骗您,因为它正常工作".真正发生的事情是 OS X 正在创建一个 ASCII 文本文件,其中包含XSym"行以及它链接"到的文件的名称,以及一些文件系统信息.您可以通过在记事本中打开 Windows 系统上的软链接来确认这一点.通常,如果您在记事本中打开实际图像,您会看到二进制代码,但您应该看到来自这些假符号链接的文本.

Assuming the above situation, the problem is that there are no symlinks in FAT32 because the file system doesn't support them. OS X is tricking you because it "just works". What is really happening is that OS X is creating an ASCII text file that contains the line "XSym" along with the name of the file it is "linking" to, plus some file system information. You can confirm this by opening your softlinks on your Windows system in notepad. Normally you would see binary code if you were opening an actual image in notepad, but instead you should see the text from these fake symlinks.

那你怎么办?我看到了几个选项:

So, what do you do? I see a couple of options:

  1. 您可以使用支持软链接的文件系统.这可能意味着使用 HFS+(OS X 文件系统),这将要求您在 Windows 系统上安装 HFS+ 驱动程序,以便它可以读/写文件系统.或者它可能意味着走向另一个方向并使用 NTFS(Windows 文件系统),这将要求您在 Mac 上安装 NTFS 驱动程序.请注意,最新版本的 OS X 可以读取 NTFS 文件系统,但无法写入.

  1. You could use a file system that supports soft links. This could mean using HFS+ (OS X file system) which would require you to install HFS+ drivers on your Windows system so that it can read/write to the file system. Or it could mean going in the other direction and using NTFS (Windows file system) which would require you to install NTFS drivers on your Mac. Note that most recent versions of OS X can read NTFS file systems, they just can't write to them.

您可以使用 OS X 创建的虚假符号链接.这需要编写解析器来解释链接或找到为您执行此操作的库.我没有副本,但我相信OS X Internals"一书中涵盖了 XSym 格式.

You could use the fake symlinks that OS X is creating. This would require writing a parser to interpret the links or finding a library that does this for you. I don't have a copy, but I believe the XSym format is covered in the "OS X Internals" book.

您可以重新考虑解决问题的方法,以便它不需要您使用符号链接.

You could rethink the approach to your problem so that it doesn't require you to use symlinks.

如果这不能解决您的问题,请提供更多详细信息,因为我不得不对您的情况进行一些猜测.

If this didn't solve your problem, then please provide more details because I had to make some guesses about your situation.

==编辑==

查看有关符号链接的 subversion 文档此处.文档中的相关引用是:

Take a look at the subversion documentation on symbolic links here. The relevant quote from the doc is:

版本符号链接

在非 Windows 平台上,Subversion 能够对特殊类型的符号链接(或符号链接").符号链接是一个文件充当对某些其他对象的透明引用文件系统,允许程序读取和写入这些对象间接通过对符号链接本身执行操作.

On non-Windows platforms, Subversion is able to version files of the special type symbolic link (or "symlink"). A symlink is a file that acts as a sort of transparent reference to some other object in the filesystem, allowing programs to read and write to those objects indirectly by way of performing operations on the symlink itself.

当符号链接提交到 Subversion 存储库时,Subversion记住该文件实际上是一个符号链接,以及对象符号链接指向".当该符号链接被检出时非 Windows 系统上的另一个工作副本,Subversion 重建来自版本化符号链接的真实文件系统级符号链接.但这不会以任何方式限制工作副本的可用性Windows 等不支持符号链接的系统.在这样的系统上,Subversion 只是创建一个常规的文本文件,其内容是原始符号链接指向的路径.虽然那个文件不能在 Windows 系统上用作符号链接,它也不会阻止Windows 用户从执行其他与 Subversion 相关的活动.

When a symlink is committed into a Subversion repository, Subversion remembers that the file was in fact a symlink, as well as the object to which the symlink "points." When that symlink is checked out to another working copy on a non-Windows system, Subversion reconstructs a real filesystem-level symbolic link from the versioned symlink. But that doesn't in any way limit the usability of working copies on systems such as Windows that do not support symlinks. On such systems, Subversion simply creates a regular text file whose contents are the path to which to the original symlink pointed. While that file can't be used as a symlink on a Windows system, it also won't prevent Windows users from performing their other Subversion-related activities.

基本上,它说的是类似于我之前提到的内容,即如果在 Windows 系统上根本不支持符号链接.Subversion 只是使用链接的内容创建文本文件,因此您可以选择自己弄清楚如何解析这些文本文件,或者尝试找到一个可以为您解析它们的库.

Basically, it says something similar to what I mentioned earlier, which is that symlinks are not supported that well if at all on Windows systems. Subversion just creates text files with the contents of the link so you can choose to either figure out how to parse these text files yourself or try to find a library that will parse them for you.

这篇关于如何在 Windows 8 中使用在 Mac 上创建的重用软链接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆