[源码下载]

背水一战 Windows 10 (88) - 文件系统: 操作文件夹和文件

作者:webabcd

介绍
背水一战 Windows 10 之 文件系统

  • 创建文件夹,重命名文件夹,删除文件夹,在指定的文件夹中创建文件
  • 创建文件,复制文件,移动文件,重命名文件,删除文件
  • 打开文件,获取指定的本地 uri 的文件,通过 StreamedFileDataRequest 或远程 uri 创建文件或替换文件

示例
1、演示如何创建文件夹,重命名文件夹,删除文件夹,在指定的文件夹中创建文件
FileSystem/FolderOperation.xaml

<Page
x:Class="Windows10.FileSystem.FolderOperation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.FileSystem"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10"> <TextBlock Name="lblMsg" Margin="5" /> <Button Name="btnCreateFolder" Content="创建文件夹" Click="btnCreateFolder_Click" Margin="5" /> <Button Name="btnRenameFolder" Content="重命名文件夹" Click="btnRenameFolder_Click" Margin="5" /> <Button Name="btnDeleteFolder" Content="删除文件夹" Click="btnDeleteFolder_Click" Margin="5" /> <Button Name="btnCreateFile" Content="在指定的文件夹中创建文件" Click="btnCreateFile_Click" Margin="5" /> </StackPanel>
</Grid>
</Page>

FileSystem/FolderOperation.xaml.cs

/*
* 演示如何创建文件夹,重命名文件夹,删除文件夹,在指定的文件夹中创建文件
*
* StorageFolder - 文件夹操作类
* public IAsyncOperation<StorageFile> CreateFileAsync(string desiredName);
* public IAsyncOperation<StorageFile> CreateFileAsync(string desiredName, CreationCollisionOption options);
* public IAsyncOperation<StorageFolder> CreateFolderAsync(string desiredName);
* public IAsyncOperation<StorageFolder> CreateFolderAsync(string desiredName, CreationCollisionOption options);
* public IAsyncAction RenameAsync(string desiredName);
* public IAsyncAction RenameAsync(string desiredName, NameCollisionOption option);
* public IAsyncAction DeleteAsync();
* public IAsyncAction DeleteAsync(StorageDeleteOption option);
*
* CreationCollisionOption
* GenerateUniqueName - 存在则在名称后自动追加编号
* ReplaceExisting - 存在则替换
* FailIfExists - 存在则抛出异常
* OpenIfExists - 存在则返回现有项
*
* NameCollisionOption
* GenerateUniqueName - 存在则在名称后自动追加编号
* ReplaceExisting - 存在则替换
* FailIfExists - 存在则抛出异常
*
* StorageDeleteOption
* Default - 默认行为
* PermanentDelete - 永久删除(不会移至回收站)
*
*
* 注:以上接口不再一一说明,看看下面的示例代码就基本都明白了
*/ using System;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; namespace Windows10.FileSystem
{
public sealed partial class FolderOperation : Page
{
private StorageFolder _myFolder = null; public FolderOperation()
{
this.InitializeComponent();
} // 创建文件夹
private async void btnCreateFolder_Click(object sender, RoutedEventArgs e)
{
StorageFolder picturesFolder = await KnownFolders.GetFolderForUserAsync(null, KnownFolderId.PicturesLibrary);
_myFolder = await picturesFolder.CreateFolderAsync("MyFolder", CreationCollisionOption.OpenIfExists); // 创建文件夹时也可以按照下面这种方式创建多级文件夹
// _myFolder = await picturesFolder.CreateFolderAsync(@"MyFolder\sub\subsub", CreationCollisionOption.OpenIfExists); lblMsg.Text = "创建了文件夹";
} // 重命名文件夹
private async void btnRenameFolder_Click(object sender, RoutedEventArgs e)
{
if (_myFolder != null)
{
await _myFolder.RenameAsync("MyFolder_Rename", NameCollisionOption.FailIfExists);
lblMsg.Text = "重命名了文件夹";
}
} // 删除文件夹
private async void btnDeleteFolder_Click(object sender, RoutedEventArgs e)
{
if (_myFolder != null)
{
await _myFolder.DeleteAsync(StorageDeleteOption.Default);
lblMsg.Text = "删除了文件夹"; _myFolder = null;
}
} // 在指定的文件夹中创建文件
private async void btnCreateFile_Click(object sender, RoutedEventArgs e)
{
if (_myFolder != null)
{
StorageFile myFile = await _myFolder.CreateFileAsync("MyFile", CreationCollisionOption.OpenIfExists); // 创建文件时也可以按照下面这种方式指定子目录(目录不存在的话会自动创建)
// StorageFile myFile = await _myFolder.CreateFileAsync(@"folder1\folder2\MyFile", CreationCollisionOption.OpenIfExists); lblMsg.Text = "在指定的文件夹中创建了文件";
}
}
}
}

2、演示如何创建文件,复制文件,移动文件,重命名文件,删除文件
FileSystem/FileOperation.xaml

<Page
x:Class="Windows10.FileSystem.FileOperation"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.FileSystem"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10"> <TextBlock Name="lblMsg" Margin="5" /> <Button Name="btnCreateFolder" Content="创建文件夹" Click="btnCreateFolder_Click" Margin="5" /> <Button Name="btnCreateFile" Content="在指定的文件夹中创建文件" Click="btnCreateFile_Click" Margin="5" /> <Button Name="btnCopyFile" Content="复制文件" Click="btnCopyFile_Click" Margin="5" /> <Button Name="btnMoveFile" Content="移动文件" Click="btnMoveFile_Click" Margin="5" /> <Button Name="btnRenameFile" Content="重命名文件" Click="btnRenameFile_Click" Margin="5" /> <Button Name="btnDeleteFile" Content="删除文件" Click="btnDeleteFile_Click" Margin="5" /> </StackPanel>
</Grid>
</Page>

FileSystem/FileOperation.xaml.cs

/*
* 演示如何创建文件,复制文件,移动文件,重命名文件,删除文件
*
* StorageFile - 文件操作类
* public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder);
* public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, string desiredNewName);
* public IAsyncOperation<StorageFile> CopyAsync(IStorageFolder destinationFolder, string desiredNewName, NameCollisionOption option);
* public IAsyncAction CopyAndReplaceAsync(IStorageFile fileToReplace);
* public IAsyncAction MoveAsync(IStorageFolder destinationFolder);
* public IAsyncAction MoveAsync(IStorageFolder destinationFolder, string desiredNewName);
* public IAsyncAction MoveAsync(IStorageFolder destinationFolder, string desiredNewName, NameCollisionOption option);
* public IAsyncAction MoveAndReplaceAsync(IStorageFile fileToReplace);
* public IAsyncAction RenameAsync(string desiredName);
* public IAsyncAction RenameAsync(string desiredName, NameCollisionOption option);
* public IAsyncAction DeleteAsync();
* public IAsyncAction DeleteAsync(StorageDeleteOption option);
*
* CreationCollisionOption
* GenerateUniqueName - 存在则在名称后自动追加编号
* ReplaceExisting - 存在则替换
* FailIfExists - 存在则抛出异常
* OpenIfExists - 存在则返回现有项
*
* NameCollisionOption
* GenerateUniqueName - 存在则在名称后自动追加编号
* ReplaceExisting - 存在则替换
* FailIfExists - 存在则抛出异常
*
* StorageDeleteOption
* Default - 默认行为
* PermanentDelete - 永久删除(不会移至回收站)
*
*
* 注:以上接口不再一一说明,看看下面的示例代码就基本都明白了
*/ using System;
using Windows.Storage;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls; namespace Windows10.FileSystem
{
public sealed partial class FileOperation : Page
{
private StorageFolder _myFolder = null; public FileOperation()
{
this.InitializeComponent();
} // 创建文件夹
private async void btnCreateFolder_Click(object sender, RoutedEventArgs e)
{
StorageFolder picturesFolder = await KnownFolders.GetFolderForUserAsync(null, KnownFolderId.PicturesLibrary);
_myFolder = await picturesFolder.CreateFolderAsync("MyFolder", CreationCollisionOption.OpenIfExists); // 创建文件夹时也可以按照下面这种方式创建多级文件夹
// _myFolder = await picturesFolder.CreateFolderAsync(@"MyFolder\sub\subsub", CreationCollisionOption.OpenIfExists); lblMsg.Text = "创建了文件夹";
} // 在指定的文件夹中创建文件
private async void btnCreateFile_Click(object sender, RoutedEventArgs e)
{
if (_myFolder != null)
{
StorageFile myFile = await _myFolder.CreateFileAsync("MyFile", CreationCollisionOption.OpenIfExists); // 创建文件时也可以按照下面这种方式指定子目录(目录不存在的话会自动创建)
// StorageFile myFile = await _myFolder.CreateFileAsync(@"folder1\folder2\MyFile", CreationCollisionOption.OpenIfExists); lblMsg.Text = "在指定的文件夹中创建了文件";
}
} // 复制文件
private async void btnCopyFile_Click(object sender, RoutedEventArgs e)
{
if (_myFolder != null)
{
try
{
StorageFile myFile = await _myFolder.GetFileAsync("MyFile");
StorageFile myFile_copy = await myFile.CopyAsync(_myFolder, "MyFile_Copy", NameCollisionOption.ReplaceExisting);
lblMsg.Text = "复制了文件";
}
catch (Exception ex)
{
lblMsg.Text = ex.ToString();
}
}
} // 移动文件
private async void btnMoveFile_Click(object sender, RoutedEventArgs e)
{
if (_myFolder != null)
{
try
{
StorageFile myFile = await _myFolder.GetFileAsync("MyFile");
await myFile.MoveAsync(_myFolder, "MyFile_Move", NameCollisionOption.ReplaceExisting);
lblMsg.Text = "移动了文件";
}
catch (Exception ex)
{
lblMsg.Text = ex.ToString();
}
}
} // 重命名文件
private async void btnRenameFile_Click(object sender, RoutedEventArgs e)
{
if (_myFolder != null)
{
try
{
StorageFile myFile = await _myFolder.GetFileAsync("MyFile_Move");
await myFile.RenameAsync("MyFile_Rename", NameCollisionOption.ReplaceExisting);
lblMsg.Text = "重命名了文件";
}
catch (Exception ex)
{
lblMsg.Text = ex.ToString();
}
}
} // 删除文件
private async void btnDeleteFile_Click(object sender, RoutedEventArgs e)
{
if (_myFolder != null)
{
try
{
StorageFile myFile = await _myFolder.GetFileAsync("MyFile_Rename");
await myFile.DeleteAsync(StorageDeleteOption.Default);
lblMsg.Text = "删除了文件";
}
catch (Exception ex)
{
lblMsg.Text = ex.ToString();
}
}
}
}
}

3、演示如何打开文件,获取指定的本地 uri 的文件,通过 StreamedFileDataRequest 或远程 uri 创建文件或替换文件
FileSystem/FileOperation2.xaml

<Page
x:Class="Windows10.FileSystem.FileOperation2"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:Windows10.FileSystem"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d"> <Grid Background="Transparent">
<StackPanel Margin="10 0 10 10"> <Image Name="image1" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" />
<Image Name="image2" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" />
<Image Name="image3" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" />
<Image Name="image4" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" />
<Image Name="image5" Width="50" Height="50" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="5" /> <Button Name="btnGetFile" Content="获取指定的本地 uri 的文件" Click="btnGetFile_Click" Margin="5" />
<Button Name="btnCreateFile1" Content="通过 StreamedFileDataRequest 创建文件" Click="btnCreateFile1_Click" Margin="5" />
<Button Name="btnCreateFile2" Content="通过远程 uri 创建文件" Click="btnCreateFile2_Click" Margin="5" />
<Button Name="btnReplaceFile1" Content="通过 StreamedFileDataRequest 替换文件" Click="btnReplaceFile1_Click" Margin="5" />
<Button Name="btnReplaceFile2" Content="通过远程 uri 替换文件" Click="btnReplaceFile2_Click" Margin="5" /> </StackPanel>
</Grid>
</Page>

FileSystem/FileOperation2.xaml.cs

/*
* 演示如何打开文件,获取指定的本地 uri 的文件,通过 StreamedFileDataRequest 或远程 uri 创建文件或替换文件
*
* StorageFile - 文件操作类
* public IAsyncOperation<IRandomAccessStream> OpenAsync(FileAccessMode accessMode) - 打开文件,可以指定是只读方式还是读写方式,返回 IRandomAccessStream 流
* public IAsyncOperation<IRandomAccessStreamWithContentType> OpenReadAsync() - 以只读方式打开文件,返回 IRandomAccessStreamWithContentType 流
* public IAsyncOperation<IInputStream> OpenSequentialReadAsync() - 以只读方式打开文件,返回 IInputStream 流
*
* public static IAsyncOperation<StorageFile> GetFileFromApplicationUriAsync(Uri uri);
* public static IAsyncOperation<StorageFile> CreateStreamedFileAsync(string displayNameWithExtension, StreamedFileDataRequestedHandler dataRequested, IRandomAccessStreamReference thumbnail);
* public static IAsyncOperation<StorageFile> ReplaceWithStreamedFileAsync(IStorageFile fileToReplace, StreamedFileDataRequestedHandler dataRequested, IRandomAccessStreamReference thumbnail);
* public static IAsyncOperation<StorageFile> CreateStreamedFileFromUriAsync(string displayNameWithExtension, Uri uri, IRandomAccessStreamReference thumbnail);
* public static IAsyncOperation<StorageFile> ReplaceWithStreamedFileFromUriAsync(IStorageFile fileToReplace, Uri uri, IRandomAccessStreamReference thumbnail);
*
*
* 注:以上接口不再一一说明,看看下面的示例代码就基本都明白了
*/ using System;
using Windows.Storage;
using Windows.Storage.Streams;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Media.Imaging; namespace Windows10.FileSystem
{
public sealed partial class FileOperation2 : Page
{
public FileOperation2()
{
this.InitializeComponent();
} private async void btnGetFile_Click(object sender, RoutedEventArgs e)
{
// 获取指定的本地 uri 的文件
StorageFile storageFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///Assets/hololens.jpg"));
// 只读方式打开文件,返回 IRandomAccessStream 流
IRandomAccessStream stream = await storageFile.OpenReadAsync(); BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(stream);
image1.Source = bitmapImage;
} private async void btnCreateFile1_Click(object sender, RoutedEventArgs e)
{
// 通过 StreamedFileDataRequest 创建文件
StorageFile storageFile = await StorageFile.CreateStreamedFileAsync("GetFileFromApplicationUriAsync.jpg", StreamHandler, null);
// 只读方式打开文件,返回 IRandomAccessStream 流
IRandomAccessStream stream = await storageFile.OpenReadAsync(); BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(stream);
image2.Source = bitmapImage;
} private async void btnCreateFile2_Click(object sender, RoutedEventArgs e)
{
Uri uri = new Uri("http://images.cnblogs.com/mvpteam.gif", UriKind.Absolute);
// 通过远程 uri 创建文件
StorageFile storageFile = await StorageFile.CreateStreamedFileFromUriAsync("CreateStreamedFileFromUriAsync.gif", uri, null);
// 只读方式打开文件,返回 IRandomAccessStream 流
IRandomAccessStream stream = await storageFile.OpenReadAsync(); BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(stream);
image3.Source = bitmapImage;
} private async void btnReplaceFile1_Click(object sender, RoutedEventArgs e)
{
StorageFolder picturesFolder = await KnownFolders.GetFolderForUserAsync(null, KnownFolderId.PicturesLibrary);
// 需要被替换的文件
StorageFile storageFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(@"webabcdTest\GetFolderForUserAsync.jpg", CreationCollisionOption.ReplaceExisting); // 通过 StreamedFileDataRequest 替换指定的文件,然后通过返回的 newFile 对象操作替换后的文件
StorageFile newFile = await StorageFile.ReplaceWithStreamedFileAsync(storageFile, StreamHandler, null);
// 只读方式打开文件,返回 IRandomAccessStream 流
IRandomAccessStream stream = await newFile.OpenReadAsync(); BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(stream);
image4.Source = bitmapImage;
} private async void btnReplaceFile2_Click(object sender, RoutedEventArgs e)
{
StorageFolder picturesFolder = await KnownFolders.GetFolderForUserAsync(null, KnownFolderId.PicturesLibrary);
// 需要被替换的文件
StorageFile storageFile = await ApplicationData.Current.LocalFolder.CreateFileAsync(@"webabcdTest\CreateStreamedFileFromUriAsync.jpg", CreationCollisionOption.ReplaceExisting); Uri uri = new Uri("http://images.cnblogs.com/mvpteam.gif", UriKind.Absolute);
// 通过远程 uri 替换指定的文件,然后通过返回的 newFile 对象操作替换后的文件
StorageFile newFile = await StorageFile.ReplaceWithStreamedFileFromUriAsync(storageFile, uri, null);
// 只读方式打开文件,返回 IRandomAccessStream 流
IRandomAccessStream stream = await newFile.OpenReadAsync(); BitmapImage bitmapImage = new BitmapImage();
bitmapImage.SetSource(stream);
image5.Source = bitmapImage;
} // 一个 StreamedFileDataRequestedHandler
private async void StreamHandler(StreamedFileDataRequest stream)
{
StorageFile storageFile = await StorageFile.GetFileFromApplicationUriAsync(new Uri("ms-appx:///assets/hololens.jpg"));
IInputStream inputStream = await storageFile.OpenSequentialReadAsync();
await RandomAccessStream.CopyAndCloseAsync(inputStream, stream);
}
}
}

OK
[源码下载]

背水一战 Windows 10 (88) - 文件系统: 操作文件夹和文件的更多相关文章

  1. 背水一战 Windows 10 (90) - 文件系统: 获取 Package 中的文件, 可移动存储中的文件操作, “库”管理

    [源码下载] 背水一战 Windows 10 (90) - 文件系统: 获取 Package 中的文件, 可移动存储中的文件操作, “库”管理 作者:webabcd 介绍背水一战 Windows 10 ...

  2. 背水一战 Windows 10 (91) - 文件系统: Application Data 中的文件操作, Application Data 中的“设置”操作, 通过 uri 引用 Application Data 中的媒体

    [源码下载] 背水一战 Windows 10 (91) - 文件系统: Application Data 中的文件操作, Application Data 中的“设置”操作, 通过 uri 引用 Ap ...

  3. 背水一战 Windows 10 (86) - 文件系统: 获取文件夹的属性, 获取文件夹的缩略图

    [源码下载] 背水一战 Windows 10 (86) - 文件系统: 获取文件夹的属性, 获取文件夹的缩略图 作者:webabcd 介绍背水一战 Windows 10 之 文件系统 获取文件夹的属性 ...

  4. 背水一战 Windows 10 (85) - 文件系统: 获取文件夹和文件, 分组文件夹, 排序过滤文件夹和文件, 搜索文件

    [源码下载] 背水一战 Windows 10 (85) - 文件系统: 获取文件夹和文件, 分组文件夹, 排序过滤文件夹和文件, 搜索文件 作者:webabcd 介绍背水一战 Windows 10 之 ...

  5. 背水一战 Windows 10 (87) - 文件系统: 获取文件的属性, 修改文件的属性, 获取文件的缩略图

    [源码下载] 背水一战 Windows 10 (87) - 文件系统: 获取文件的属性, 修改文件的属性, 获取文件的缩略图 作者:webabcd 介绍背水一战 Windows 10 之 文件系统 获 ...

  6. 背水一战 Windows 10 (92) - 文件系统: 读写“最近访问列表”和“未来访问列表”, 管理以及使用索引

    [源码下载] 背水一战 Windows 10 (92) - 文件系统: 读写“最近访问列表”和“未来访问列表”, 管理以及使用索引 作者:webabcd 介绍背水一战 Windows 10 之 文件系 ...

  7. 背水一战 Windows 10 (89) - 文件系统: 读写文本数据, 读写二进制数据, 读写流数据

    [源码下载] 背水一战 Windows 10 (89) - 文件系统: 读写文本数据, 读写二进制数据, 读写流数据 作者:webabcd 介绍背水一战 Windows 10 之 文件系统 读写文本数 ...

  8. 背水一战 Windows 10 (99) - 关联启动: 关联指定的文件类型, 关联指定的协议

    [源码下载] 背水一战 Windows 10 (99) - 关联启动: 关联指定的文件类型, 关联指定的协议 作者:webabcd 介绍背水一战 Windows 10 之 关联启动 关联指定的文件类型 ...

  9. 重新想象 Windows 8 Store Apps (22) - 文件系统: 访问文件夹和文件, 通过 AQS 搜索本地文件

    原文:重新想象 Windows 8 Store Apps (22) - 文件系统: 访问文件夹和文件, 通过 AQS 搜索本地文件 [源码下载] 重新想象 Windows 8 Store Apps ( ...

随机推荐

  1. canvas 2.0 图片绘制

    绘制图片drawImage 2013.02.21 by 十年灯·一条评论 本文属于<html5 Canvas画图系列教程> 这里的绘制图片是指把一张现成的图片,绘制到Canvas上面. 有 ...

  2. JEECG-Swagger UI的使用说明

    一.代码生成 (此步骤为代码生成器的使用,如不清楚请查阅相关文档视频) 1.进入菜单[在线开发]-->[Online表单开发],选中一张单表/主表,点击代码生成按钮. 2.弹出页面中填写代码生成 ...

  3. jstat查看JVM GC情况

    转自 https://www.cnblogs.com/yjd_hycf_space/p/7755633.html

  4. Java 基本类型和包装类型

    讲基本类型和包装类型之前,首先要介绍,装箱和拆箱 装箱:基本类型转化为包装类型 拆箱:包装类型转化为拆箱类型 为什么要有包装类型?Java是面向对象的语言,Java中一切都是对象除了基本数据类型,所以 ...

  5. Handler实现消息的定时发送

    话不多说,直接上代码 private Handler mHandler = new Handler() { @Override public void handleMessage(Message ms ...

  6. js学习(5)语法专题

    Js是一种动态类型语言,变量没有类型限制,可以随时赋值 强制转换: 主要指使用Number(),String()和Boolean()三个函数,手动将各个类型的值,分别转换为数字,字符串或布尔值 Num ...

  7. Zabbix安装部署(CentOS系统下)

    zabbix(音同 zæbix)是一个基于WEB界面的提供分布式系统监视以及网络监视功能的企业级的开源解决方案. zabbix能监视各种网络参数,保证服务器系统的安全运营:并提供灵活的通知机制以让系统 ...

  8. calendar模块

    calendar模块是个日历模块 1  判断是否是闰年 #!/urs/bin/evn python # -*- coding:utf-8 -*- import calendar print(calen ...

  9. Python程序中的进程操作

    之前我们已经了解了很多进程相关的理论知识,了解进程是什么应该不再困难了,刚刚我们已经了解了,运行中的程序就是一个进程.所有的进程都是通过它的父进程来创建的.因此,运行起来的python程序也是一个进程 ...

  10. CITROEN C8 BSI HC12 Mileage Correction with Digiprog3

    CITROEN C8 BSI HC12 odometer correction pinout to Digiprog III Digiprog 3 mileage programmer. The BS ...