The samples site is not available in your language but here is the English version.

File access sample

This sample shows how to create, read, write, copy and delete a file, how to retrieve file properties, and how to track a file or folder so that your app can access it again. This sample uses Windows.Storage and Windows.Storage.AccessCache API.

 
 
 
 
 
(32)
99,289 times
Add To Favorites
28/05/34
E-mail Twitter del.icio.us Digg Facebook

Solution Explorer

C++
C#
JavaScript
VB.NET
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProjectGuid>{2F155978-BF54-467C-BACF-EAA51D65EE76}</ProjectGuid>
    <OutputType>AppContainerExe</OutputType>
    <RootNamespace>FileAccess</RootNamespace>
    <AssemblyName>FileAccessVB</AssemblyName>
    <DefaultLanguage>en-US</DefaultLanguage>
    <FileAlignment>512</FileAlignment>
    <ProjectTypeGuids>{BC8A1FFA-BEE3-4634-8014-F334798102B3};{F184B08F-C81C-45F6-A57F-5ABD9991F28F}</ProjectTypeGuids>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
    <DefineDebug>true</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <OutputPath>bin\Debug\</OutputPath>
    <NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <PlatformTarget>AnyCPU</PlatformTarget>
    <DebugType>pdbonly</DebugType>
    <DefineDebug>false</DefineDebug>
    <DefineTrace>true</DefineTrace>
    <Optimize>true</Optimize>
    <OutputPath>bin\Release\</OutputPath>
    <NoWarn>41999,42016,42017,42018,42019,42020,42021,42022,42032,42036</NoWarn>
  </PropertyGroup>
  <PropertyGroup>
    <OptionExplicit>On</OptionExplicit>
  </PropertyGroup>
  <PropertyGroup>
    <OptionCompare>Binary</OptionCompare>
  </PropertyGroup>
  <PropertyGroup>
    <OptionStrict>Off</OptionStrict>
  </PropertyGroup>
  <PropertyGroup>
    <OptionInfer>On</OptionInfer>
  </PropertyGroup>
  <ItemGroup>
    <Compile Include="App.xaml.vb">
      <DependentUpon>App.xaml</DependentUpon>
    </Compile>
    <Compile Include="Constants.vb" />
    <Compile Include="MainPage.xaml.vb">
      <DependentUpon>MainPage.xaml</DependentUpon>
    </Compile>
    <Compile Include="Sample-Utils\SuspensionManager.vb" />
    <Compile Include="Common\LayoutAwarePage.vb" />
    <Compile Include="Project\AssemblyInfo.vb" />
    <Compile Include="Scenario1.xaml.vb">
      <DependentUpon>Scenario1.xaml</DependentUpon>
    </Compile>
    <Compile Include="Scenario2.xaml.vb">
      <DependentUpon>Scenario2.xaml</DependentUpon>
    </Compile>
    <Compile Include="Scenario3.xaml.vb">
      <DependentUpon>Scenario3.xaml</DependentUpon>
    </Compile>
    <Compile Include="Scenario4.xaml.vb">
      <DependentUpon>Scenario4.xaml</DependentUpon>
    </Compile>
    <Compile Include="Scenario5.xaml.vb">
      <DependentUpon>Scenario5.xaml</DependentUpon>
    </Compile>
    <Compile Include="Scenario6.xaml.vb">
      <DependentUpon>Scenario6.xaml</DependentUpon>
    </Compile>
    <Compile Include="Scenario7.xaml.vb">
      <DependentUpon>Scenario7.xaml</DependentUpon>
    </Compile>
    <Compile Include="Scenario8.xaml.vb">
      <DependentUpon>Scenario8.xaml</DependentUpon>
    </Compile>
  </ItemGroup>
  <ItemGroup>
    <AppxManifest Include="Package.appxmanifest">
      <SubType>Designer</SubType>
    </AppxManifest>
  </ItemGroup>
  <ItemGroup>
    <Content Include="Assets\microsoft-sdk.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Assets\placeholder-sdk.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Assets\smallTile-sdk.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Assets\splash-sdk.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Assets\squareTile-sdk.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Assets\storeLogo-sdk.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Assets\tile-sdk.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Content Include="Assets\windows-sdk.png">
      <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
    </Content>
    <Page Include="Sample-Utils\SampleTemplateStyles.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="Scenario1.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Scenario2.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Scenario3.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Scenario4.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Scenario5.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Scenario6.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Scenario7.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
    <Page Include="Scenario8.xaml">
      <SubType>Designer</SubType>
      <Generator>MSBuild:Compile</Generator>
    </Page>
  </ItemGroup>
  <ItemGroup>
    <ApplicationDefinition Include="App.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </ApplicationDefinition>
    <Page Include="Common\StandardStyles.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
    <Page Include="MainPage.xaml">
      <Generator>MSBuild:Compile</Generator>
      <SubType>Designer</SubType>
    </Page>
  </ItemGroup>
  <ItemGroup>
    <Import Include="Microsoft.VisualBasic" />
    <Import Include="System" />
    <Import Include="System.Collections" />
    <Import Include="System.Collections.Generic" />
    <Import Include="System.Diagnostics" />
    <Import Include="System.Linq" />
    <Import Include="System.Threading.Tasks" />
    <Import Include="System.Xml.Linq" />
    <Import Include="Windows.ApplicationModel.Activation" />
    <Import Include="Windows.Foundation" />
    <Import Include="Windows.Foundation.Collections" />
    <Import Include="Windows.Graphics.Display" />
    <Import Include="Windows.UI.ViewManagement" />
    <Import Include="Windows.UI.Xaml" />
    <Import Include="Windows.UI.Xaml.Controls" />
    <Import Include="Windows.UI.Xaml.Controls.Primitives" />
    <Import Include="Windows.UI.Xaml.Data" />
    <Import Include="Windows.UI.Xaml.Input" />
    <Import Include="Windows.UI.Xaml.Media" />
    <Import Include="Windows.UI.Xaml.Media.Imaging" />
  </ItemGroup>
  <ItemGroup />
  <PropertyGroup Condition=" '$(VisualStudioVersion)' == '' ">
    <VisualStudioVersion>11.0</VisualStudioVersion>
  </PropertyGroup>
  <Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.VisualBasic.targets" />
  <!-- To modify your build process, add your task inside one of the targets below and uncomment it. 
       Other similar extension points exist, see Microsoft.Common.targets.
  <Target Name="BeforeBuild">
  </Target>
  <Target Name="AfterBuild">
  </Target>
  -->
</Project>