简体   繁体   English

.NET(Mono)是否支持跨平台文件操作和跨平台音频元数据处理(通过库)?

[英]Does .NET (Mono) support cross-platform file operations and cross-platform audio metadata handling (through libraries)?

For my next project, the two leading frontrunners are .NET and Java. 对于我的下一个项目,.NET和Java是两个领先的领跑者。 The project is to take a directory (something like My Music in Windows) that contains directories and music files (MP3s initially, but eventually expanded to other music formats). 该项目将获取一个包含目录和音乐文件(最初为MP3,但最终扩展为其他音乐格式)的目录(类似于Windows中的“我的音乐”)。 For each file, it would allow you to play the file and view/edit its metadata, filename, and location. 对于每个文件,它将允许您播放文件并查看/编辑其元数据,文件名和位置。

I know that Java has libraries for both getting/editing metadata and cross-platform support for file operations. 我知道Java具有用于获取/编辑元数据的库以及对文件操作的跨平台支持。 I also know that .NET has libraries for dealing with the metadata, but I'm not sure about the file operations I need. 我也知道.NET具有用于处理元数据的库,但是我不确定所需的文件操作。 However, I really want to get back into .NET, especially since I want to keep it on my resume, but I haven't used it since .NET 2.0 (and it's, what, 3.5 now?) and if I don't keep up with it, there's no point in putting it on my resume since I couldn't answer any questions about new versions of the technology. 但是,我真的很想回到.NET,特别是因为我想将其保留在我的简历中,但是自.NET 2.0(现在是3.5,现在)以来,我就再也没有使用它了,如果我不这样做的话。跟上它,因为我无法回答有关该技术的新版本的任何问题,所以将它放在简历上毫无意义。

Initially, Windows is my only concern, but I would like to release this as a cross-platform application. 最初,Windows是我唯一关心的问题,但我想将其作为跨平台应用程序发布。

Note: I do know that I'm reinventing the wheel, but this is a problem that I've encountered and I think it would be kind of fun to solve. 注意:我确实知道我正在重新发明轮子,但这是我遇到的一个问题,我认为解决这个问题会很有趣。 It deals with a number of problems, from UI concerns to file structure management to external libraries and more. 它涉及许多问题,从UI问题到文件结构管理再到外部库等等。

The official page from mono on the first part of this topic is IOMap . mono的官方页面是IOMap

Mono now has a portability layer into Mono that will address those problems without requiring changes to your code. Mono现在在Mono中具有一个可移植性层,可以在不更改代码的情况下解决这些问题。 This will remove a large component of the porting cycle as a whole class of obnoxious problems are gone. 这将消除移植周期的很大一部分,因为一整类令人讨厌的问题都消失了。

The new portability framework is enabled by setting the environment variable MONO_IOMAP (which we will likely rename to something shorter) to one of the following values: 通过将环境变量MONO_IOMAP (我们可能会将其重命名为更短的名称)设置为以下值之一来启用新的可移植性框架:

  • case: makes all file system access case insensitive. case:使所有文件系统访问不区分大小写。
  • drive: strips drive name from pathnames. drive:从路径名中删除驱动器名称。
  • all: enables both case and drive. all:同时启用大小写和驱动器。

In addition, if any of those options are enabled, the directory separator mapping is also turned on. 此外,如果启用了这些选项中的任何一个,则目录分隔符映射也会打开。

This functionality is included since 1.1.18. 自1.1.18起包含此功能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM