Cassondra Foesch
0f6e8d5016
exploit the embedded FileStat in fileInfo
2021-08-11 13:20:30 +00:00
Cassondra Foesch
ba854bee45
collect all marshal/unmarshal functions into packet.go
2021-08-11 11:12:34 +00:00
greatroar
32b9d99cf4
Fix typos in private identifiers
2021-03-20 20:35:04 +01:00
Fazlul Shahriar
6120cae121
Fix build on Plan 9
...
All test are passing on Plan 9, and I've also verified
`examples/go-sftp-server` is working.
2020-09-10 18:18:22 -04:00
John Eikenberry
0277caa990
fix S_IFMT value on windows and plan9
...
Go defines S_IFMT on windows, plan9 and js/wasm as 0x1f000 instead of
0xf000. None of the the other S_IFxyz values (even on those mentioned)
include the "1" (in 0x1f000) which prevents them from matching the
bitmask.
This fixes that by overriding the S_IFMT value on the effected platforms
to be 0xf000, as it it on all others.
2020-01-02 12:59:24 -08:00
Paul van Santen
f94839fd59
Add const for all attribute flags and add missing newline
2019-12-27 10:56:42 +01:00
Paul van Santen
1bb2f2849b
Fix panics when attempting to get file attributes from too small byte slice
2019-12-24 09:37:32 +01:00
Nicola Murino
b4ea0fd6f6
fix lint issues
...
These lint issues remain:
- request-errors.go, aliases for new error types
- request-attrs.go, UidGid. Changing this will break compatibility
2019-08-30 17:04:37 +02:00
John Eikenberry
0ef30ab089
Make request attribute structs public for docs
...
Make the structures used to hold the file flags/attributes public so
they can be documented. Improve the names to make their use clearer and
make the docs more obvious.
Fixes #245
2018-05-11 14:15:09 -07:00
John Eikenberry
161bbaf9a8
a few code simplifications
...
ran gosimple over the code and made suggested adjustments
2018-02-15 11:17:19 -08:00
John Eikenberry
c40e9cd1ca
split out FileStat creation
...
Allows me to reuse code.
2018-01-09 15:29:55 -08:00
Matt Layher
9374ae613d
*: golint: add and fix up comments on exported types
2016-01-07 15:16:34 -05:00
Matt Layher
b348482b1a
*: golint (part 1)
2016-01-07 12:10:24 -05:00
Mark Sheahan
0a1e052cf1
fix broken windows build
2015-09-19 19:09:03 -07:00
Mark Sheahan
d7309968cd
add more tests; bug setting S_IFREG caused openssh sftp to refuse to get the file
2015-09-08 17:03:18 -07:00
Mark Sheahan
7bb2083ca9
Address review comments; about to change decodePacket()
2015-09-06 23:55:15 -07:00
Mark Sheahan
ec909a249d
gofmt
2015-09-06 22:02:47 -07:00
Mark Sheahan
421e8919ba
remove unused flags
2015-09-06 22:01:51 -07:00
Mark Sheahan
5b6348f034
version, lstat
2015-07-25 01:19:29 -07:00
Matthieu Rakotojaona
1d4fedf03c
Format with go fmt
2014-09-27 14:29:57 +02:00
Donavan Pantke
01da416114
Clarified documentation on FileStat to indicate why it is exported.
2014-06-24 02:12:45 -04:00
Donavan Pantke
cf08e75f1f
Refactor to make vars and receivers consistent with types used.
2014-06-23 06:55:00 -04:00
Donavan Pantke
5ea2cc512e
Refactor stat functions to look more like Go's original. Also allows for access to fields we can access from SFTP but do not conform to os.FileInfo.
2014-06-22 23:11:28 -04:00
Dave Cheney
4646e1e266
made all constants private
2013-11-06 19:12:25 +11:00
Dave Cheney
69fafb0562
Fixed attr walking, readdir now works!
2013-11-05 22:11:34 +11:00
Dave Cheney
aa9d9e3605
readdir isnt reading dirs properly
2013-11-05 17:33:47 +11:00
Dave Cheney
33830f9c3a
Added some janky POSIX -> os.FileMode conversion
2013-11-05 17:21:30 +11:00
Dave Cheney
69f358f7b8
Added file attribute parsing
2013-11-05 16:28:45 +11:00