File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ object write {
3131 if (createFolders) makeDir.all(target / RelPath .up, perms)
3232 if (perms != null && ! exists(target)) {
3333 val permArray =
34- if (perms == null ) Array [FileAttribute [PosixFilePermission ]]()
35- else Array (PosixFilePermissions .asFileAttribute(perms.toSet()))
34+ if (perms == null ) Seq [FileAttribute [PosixFilePermission ]]()
35+ else Seq (PosixFilePermissions .asFileAttribute(perms.toSet()))
3636 java.nio.file.Files .createFile(target.toNIO, permArray : _* )
3737 }
3838
Original file line number Diff line number Diff line change @@ -121,6 +121,19 @@ object ReadingWritingTests extends TestSuite {
121121 out.write('o' )
122122 out.close()
123123
124+ os.read(wd / " New File.txt" ) ==> " Hello"
125+ }
126+ }
127+ test(" outputStreamWithPerms" ) {
128+ test - prep { wd =>
129+ val out = os.write.outputStream(wd / " New File.txt" , perms = os.PermSet (420 ))
130+ out.write('H' )
131+ out.write('e' )
132+ out.write('l' )
133+ out.write('l' )
134+ out.write('o' )
135+ out.close()
136+
124137 os.read(wd / " New File.txt" ) ==> " Hello"
125138 }
126139 }
You can’t perform that action at this time.
0 commit comments