Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bfc4bc0

Browse filesBrowse files
committed
Added FileIO Demo 3
1 parent 8f6a76b commit bfc4bc0
Copy full SHA for bfc4bc0

File tree

4 files changed

+61
-0
lines changed
Filter options

4 files changed

+61
-0
lines changed

‎03_FileIO/03_FileIO.njsproj

Copy file name to clipboard
+37Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" ToolsVersion="4.0">
3+
<PropertyGroup>
4+
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">11.0</VisualStudioVersion>
5+
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath>
6+
<Name>03_FileIO</Name>
7+
<RootNamespace>03_FileIO</RootNamespace>
8+
</PropertyGroup>
9+
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
10+
<PropertyGroup>
11+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
12+
<SchemaVersion>2.0</SchemaVersion>
13+
<ProjectGuid>b2ba44eb-6dce-4dee-a2c7-1fcfdcceca0a</ProjectGuid>
14+
<ProjectHome>.</ProjectHome>
15+
<StartupFile>app.js</StartupFile>
16+
<StartWebBrowser>False</StartWebBrowser>
17+
<SearchPath>
18+
</SearchPath>
19+
<WorkingDirectory>.</WorkingDirectory>
20+
<OutputPath>.</OutputPath>
21+
<TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
22+
<ProjectTypeGuids>{3AF33F2E-1136-4D97-BBB7-1795711AC8B8};{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}</ProjectTypeGuids>
23+
<ProjectView>ShowAllFiles</ProjectView>
24+
<StartWebBrowser>false</StartWebBrowser>
25+
</PropertyGroup>
26+
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
27+
<DebugSymbols>true</DebugSymbols>
28+
</PropertyGroup>
29+
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
30+
<DebugSymbols>true</DebugSymbols>
31+
</PropertyGroup>
32+
<ItemGroup>
33+
<Compile Include="app.js" />
34+
<Content Include="package.json" />
35+
</ItemGroup>
36+
<Import Project="$(VSToolsPath)\Node.js Tools\Microsoft.NodejsTools.targets" />
37+
</Project>

‎03_FileIO/app.js

Copy file name to clipboard
+8Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var fs = require('fs');
2+
3+
var contents = fs.readFileSync('package.json').toString();
4+
console.log(contents);
5+
6+
fs.readFile('package.json', function (err, buf) {
7+
console.log(buf.toString());
8+
});

‎03_FileIO/package.json

Copy file name to clipboard
+10Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "_03_FileIO",
3+
"version": "0.0.0",
4+
"description": "03_FileIO",
5+
"main": "app.js",
6+
"author": {
7+
"name": "Rami Sayar",
8+
"email": ""
9+
}
10+
}

‎NodeMVA.sln

Copy file name to clipboardExpand all lines: NodeMVA.sln
+6Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
1313
EndProject
1414
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "02_HelloWorldHTTP", "02_HelloWorldHTTP\02_HelloWorldHTTP.njsproj", "{69B6BC1B-8847-407C-917E-BF80E6A32203}"
1515
EndProject
16+
Project("{9092AA53-FB77-4645-B42D-1CCCA6BD08BD}") = "03_FileIO", "03_FileIO\03_FileIO.njsproj", "{B2BA44EB-6DCE-4DEE-A2C7-1FCFDCCECA0A}"
17+
EndProject
1618
Global
1719
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1820
Debug|Any CPU = Debug|Any CPU
@@ -27,6 +29,10 @@ Global
2729
{69B6BC1B-8847-407C-917E-BF80E6A32203}.Debug|Any CPU.Build.0 = Debug|Any CPU
2830
{69B6BC1B-8847-407C-917E-BF80E6A32203}.Release|Any CPU.ActiveCfg = Release|Any CPU
2931
{69B6BC1B-8847-407C-917E-BF80E6A32203}.Release|Any CPU.Build.0 = Release|Any CPU
32+
{B2BA44EB-6DCE-4DEE-A2C7-1FCFDCCECA0A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33+
{B2BA44EB-6DCE-4DEE-A2C7-1FCFDCCECA0A}.Debug|Any CPU.Build.0 = Debug|Any CPU
34+
{B2BA44EB-6DCE-4DEE-A2C7-1FCFDCCECA0A}.Release|Any CPU.ActiveCfg = Release|Any CPU
35+
{B2BA44EB-6DCE-4DEE-A2C7-1FCFDCCECA0A}.Release|Any CPU.Build.0 = Release|Any CPU
3036
EndGlobalSection
3137
GlobalSection(SolutionProperties) = preSolution
3238
HideSolutionNode = FALSE

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.