Source file src/internal/syscall/windows/symlink_windows.go

     1  // Copyright 2018 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package windows
     6  
     7  import "syscall"
     8  
     9  const (
    10  	ERROR_INVALID_PARAMETER syscall.Errno = 87
    11  
    12  	FILE_SUPPORTS_OBJECT_IDS      = 0x00010000
    13  	FILE_SUPPORTS_OPEN_BY_FILE_ID = 0x01000000
    14  
    15  	// symlink support for CreateSymbolicLink() starting with Windows 10 (1703, v10.0.14972)
    16  	SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE = 0x2
    17  
    18  	// FileInformationClass values
    19  	FileBasicInfo                  = 0    // FILE_BASIC_INFO
    20  	FileStandardInfo               = 1    // FILE_STANDARD_INFO
    21  	FileNameInfo                   = 2    // FILE_NAME_INFO
    22  	FileStreamInfo                 = 7    // FILE_STREAM_INFO
    23  	FileCompressionInfo            = 8    // FILE_COMPRESSION_INFO
    24  	FileAttributeTagInfo           = 9    // FILE_ATTRIBUTE_TAG_INFO
    25  	FileIdBothDirectoryInfo        = 0xa  // FILE_ID_BOTH_DIR_INFO
    26  	FileIdBothDirectoryRestartInfo = 0xb  // FILE_ID_BOTH_DIR_INFO
    27  	FileRemoteProtocolInfo         = 0xd  // FILE_REMOTE_PROTOCOL_INFO
    28  	FileFullDirectoryInfo          = 0xe  // FILE_FULL_DIR_INFO
    29  	FileFullDirectoryRestartInfo   = 0xf  // FILE_FULL_DIR_INFO
    30  	FileStorageInfo                = 0x10 // FILE_STORAGE_INFO
    31  	FileAlignmentInfo              = 0x11 // FILE_ALIGNMENT_INFO
    32  	FileIdInfo                     = 0x12 // FILE_ID_INFO
    33  	FileIdExtdDirectoryInfo        = 0x13 // FILE_ID_EXTD_DIR_INFO
    34  	FileIdExtdDirectoryRestartInfo = 0x14 // FILE_ID_EXTD_DIR_INFO
    35  )
    36  
    37  type FILE_ATTRIBUTE_TAG_INFO struct {
    38  	FileAttributes uint32
    39  	ReparseTag     uint32
    40  }
    41  
    42  //sys	GetFileInformationByHandleEx(handle syscall.Handle, class uint32, info *byte, bufsize uint32) (err error)
    43  

View as plain text