本文整理汇总了C#中MonoIOError类的典型用法代码示例。如果您正苦于以下问题:C# MonoIOError类的具体用法?C# MonoIOError怎么用?C# MonoIOError使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MonoIOError类属于命名空间,在下文中一共展示了MonoIOError类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: ReplaceFile
public static bool ReplaceFile (string sourceFileName,
string destinationFileName,
string destinationBackupFileName,
bool ignoreMetadataErrors,
out MonoIOError error)
{
throw new System.NotImplementedException();
}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:8,代码来源:MonoIO.Mosa.cs
示例2: GetException
// error methods
public static Exception GetException (MonoIOError error)
{
/* This overload is currently only called from
* File.MoveFile(), Directory.Move() and
* Directory.GetCurrentDirectory() -
* everywhere else supplies a path to format
* with the error text.
*/
switch(error) {
case MonoIOError.ERROR_ACCESS_DENIED:
return new UnauthorizedAccessException ("Access to the path is denied.");
case MonoIOError.ERROR_FILE_EXISTS:
string message = "Cannot create a file that already exist.";
return new IOException (message, FileAlreadyExistsHResult);
default:
/* Add more mappings here if other
* errors trigger the named but empty
* path bug (see bug 82141.) For
* everything else, fall through to
* the other overload
*/
return GetException (String.Empty, error);
}
}
开发者ID:wamiq,项目名称:debian-mono,代码行数:25,代码来源:MonoIO.cs
示例3: ReplaceFile
public extern static bool ReplaceFile (string sourceFileName,
string destinationFileName,
string destinationBackupFileName,
bool ignoreMetadataErrors,
out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:5,代码来源:MonoIO.cs
示例4: Close
public extern static bool Close (IntPtr handle,
out MonoIOError error);
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:2,代码来源:MonoIO.Internal.cs
示例5: OpenMutex_internal
private static extern IntPtr OpenMutex_internal (string name, MutexRights rights, out MonoIOError error);
开发者ID:runefs,项目名称:Marvin,代码行数:1,代码来源:Mutex.cs
示例6: SetFileTime
public static bool SetFileTime (string path,
int type,
long creation_time,
long last_access_time,
long last_write_time,
DateTime dateTime,
out MonoIOError error)
{
IntPtr handle;
bool result;
handle = Open (path, FileMode.Open,
FileAccess.ReadWrite,
FileShare.ReadWrite, FileOptions.None, out error);
if (handle == MonoIO.InvalidHandle)
return false;
switch (type) {
case 1:
creation_time = dateTime.ToFileTime ();
break;
case 2:
last_access_time = dateTime.ToFileTime ();
break;
case 3:
last_write_time = dateTime.ToFileTime ();
break;
}
result = SetFileTime (handle, creation_time,
last_access_time,
last_write_time, out error);
MonoIOError ignore_error;
Close (handle, out ignore_error);
return result;
}
开发者ID:wamiq,项目名称:debian-mono,代码行数:38,代码来源:MonoIO.cs
示例7: SetCreationTime
public static bool SetCreationTime (string path,
DateTime dateTime,
out MonoIOError error)
{
return SetFileTime (path, 1, -1, -1, -1, dateTime, out error);
}
开发者ID:wamiq,项目名称:debian-mono,代码行数:6,代码来源:MonoIO.cs
示例8: ExistsDirectory
public static bool ExistsDirectory (string path,
out MonoIOError error)
{
FileAttributes attrs = GetFileAttributes (path,
out error);
// Actually, we are looking for a directory, not a file
if (error == MonoIOError.ERROR_FILE_NOT_FOUND)
error = MonoIOError.ERROR_PATH_NOT_FOUND;
if (attrs == InvalidFileAttributes)
return false;
if ((attrs & FileAttributes.Directory) == 0)
return false;
return true;
}
开发者ID:wamiq,项目名称:debian-mono,代码行数:18,代码来源:MonoIO.cs
示例9: ExistsFile
public static bool ExistsFile (string path,
out MonoIOError error)
{
FileAttributes attrs = GetFileAttributes (path,
out error);
if (attrs == InvalidFileAttributes)
return false;
if ((attrs & FileAttributes.Directory) != 0)
return false;
return true;
}
开发者ID:wamiq,项目名称:debian-mono,代码行数:13,代码来源:MonoIO.cs
示例10: FindNext
public extern static string FindNext (IntPtr handle, out FileAttributes result_attr, out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:1,代码来源:MonoIO.cs
示例11: FindFirst
public extern static string FindFirst (string path, string pattern, out FileAttributes result_attr, out MonoIOError error, out IntPtr handle);
开发者ID:wamiq,项目名称:debian-mono,代码行数:1,代码来源:MonoIO.cs
示例12: GetFileType
public extern static MonoFileType GetFileType (IntPtr handle, out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:1,代码来源:MonoIO.cs
示例13: SetFileAttributes
public extern static bool SetFileAttributes (string path, FileAttributes attrs, out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:1,代码来源:MonoIO.cs
示例14: GetFileAttributes
public extern static FileAttributes GetFileAttributes (string path, out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:1,代码来源:MonoIO.cs
示例15: GetLength
public extern static long GetLength (IntPtr handle,
out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:2,代码来源:MonoIO.cs
示例16: SetLength
public extern static bool SetLength (IntPtr handle,
long length,
out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:3,代码来源:MonoIO.cs
示例17: ExistsSymlink
public static bool ExistsSymlink (string path,
out MonoIOError error)
{
FileAttributes attrs = GetFileAttributes (path,
out error);
if (attrs == InvalidFileAttributes)
return false;
if ((attrs & FileAttributes.ReparsePoint) == 0)
return false;
return true;
}
开发者ID:wamiq,项目名称:debian-mono,代码行数:13,代码来源:MonoIO.cs
示例18: GetFileStat
public extern static bool GetFileStat (string path,
out MonoIOStat stat,
out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:3,代码来源:MonoIO.cs
示例19: SetLastWriteTime
public static bool SetLastWriteTime (string path,
DateTime dateTime,
out MonoIOError error)
{
return SetFileTime (path, 3, -1, -1, -1, dateTime, out error);
}
开发者ID:wamiq,项目名称:debian-mono,代码行数:6,代码来源:MonoIO.cs
示例20: Open
public extern static IntPtr Open (string filename,
FileMode mode,
FileAccess access,
FileShare share,
FileOptions options,
out MonoIOError error);
开发者ID:wamiq,项目名称:debian-mono,代码行数:6,代码来源:MonoIO.cs
注:本文中的MonoIOError类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论