Merge pull request #624 from PowerShell/hardlink

Add ability to create hardlinks on Linux
This commit is contained in:
Andy Schwartzmeyer 2016-03-04 17:31:46 -08:00
commit 15f5e3a2fe
3 changed files with 13 additions and 2 deletions

@ -1 +1 @@
Subproject commit 19dbaaf54cfa47c0673af6a3da2c4dad5fb56e8f
Subproject commit 5e0728e48e5c9317f35deeed4ac1493c2cf0639e

@ -1 +1 @@
Subproject commit 2a3547e9c6a22fd36dc985e6359225893d1a8459
Subproject commit 432aa99a3fd8b833c1c887e658ed8499da9b1539

View file

@ -118,4 +118,15 @@ Describe "New-Item" {
# Remove the link explicitly to avoid broken symlink issue
Remove-Item $FullyQualifiedLink -Force
}
It "Should create a hard link of a file without error" {
New-Item -Name $testfile -Path $tmpDirectory -ItemType file
Test-Path $FullyQualifiedFile | Should Be $true
New-Item -ItemType HardLink -Target $FullyQualifiedFile -Name $testlink -Path $tmpDirectory
Test-Path $FullyQualifiedLink | Should Be $true
}
}