FreeRDP
drive_file.c File Reference
#include <freerdp/config.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <winpr/wtypes.h>
#include <winpr/crt.h>
#include <winpr/string.h>
#include <winpr/path.h>
#include <winpr/file.h>
#include <winpr/stream.h>
#include <freerdp/channels/rdpdr.h>
#include "drive_file.h"

Macros

#define DEBUG_WSTR(msg, wstr)
 

Functions

static BOOL drive_file_fix_path (WCHAR *path, size_t length)
 
static BOOL contains_dotdot (const WCHAR *path, size_t base_length, size_t path_length)
 
static WCHAR * drive_file_combine_fullpath (const WCHAR *base_path, const WCHAR *path, size_t PathWCharLength)
 
static BOOL drive_file_set_fullpath (DRIVE_FILE *file, WCHAR *fullpath)
 
static BOOL drive_file_init (DRIVE_FILE *file)
 
DRIVE_FILEdrive_file_new (const WCHAR *base_path, const WCHAR *path, UINT32 PathWCharLength, UINT32 id, UINT32 DesiredAccess, UINT32 CreateDisposition, UINT32 CreateOptions, UINT32 FileAttributes, UINT32 SharedAccess)
 
BOOL drive_file_free (DRIVE_FILE *file)
 
BOOL drive_file_seek (DRIVE_FILE *file, UINT64 Offset)
 
BOOL drive_file_read (DRIVE_FILE *file, BYTE *buffer, UINT32 *Length)
 
BOOL drive_file_write (DRIVE_FILE *file, const BYTE *buffer, UINT32 Length)
 
static BOOL drive_file_query_from_handle_information (const DRIVE_FILE *file, const BY_HANDLE_FILE_INFORMATION *info, UINT32 FsInformationClass, wStream *output)
 
static BOOL drive_file_query_from_attributes (const DRIVE_FILE *file, const WIN32_FILE_ATTRIBUTE_DATA *attrib, UINT32 FsInformationClass, wStream *output)
 
BOOL drive_file_query_information (DRIVE_FILE *file, UINT32 FsInformationClass, wStream *output)
 
BOOL drive_file_set_information (DRIVE_FILE *file, UINT32 FsInformationClass, UINT32 Length, wStream *input)
 
BOOL drive_file_query_directory (DRIVE_FILE *file, UINT32 FsInformationClass, BYTE InitialQuery, const WCHAR *path, UINT32 PathWCharLength, wStream *output)
 

Macro Definition Documentation

◆ DEBUG_WSTR

#define DEBUG_WSTR (   msg,
  wstr 
)
Value:
do \
{ \
} while (0)

FreeRDP: A Remote Desktop Protocol Implementation File System Virtual Channel

Copyright 2010-2012 Marc-Andre Moreau marca.nosp@m.ndre.nosp@m..more.nosp@m.au@g.nosp@m.mail..nosp@m.com Copyright 2010-2011 Vic Lee Copyright 2012 Gerald Richter Copyright 2015 Thincast Technologies GmbH Copyright 2015 DI (FH) Martin Haimberger marti.nosp@m.n.ha.nosp@m.imber.nosp@m.ger@.nosp@m.thinc.nosp@m.ast..nosp@m.com Copyright 2016 Inuvika Inc. Copyright 2016 David PHAM-VAN d.pha.nosp@m.mvan.nosp@m.@inuv.nosp@m.ika..nosp@m.com Copyright 2017 Armin Novak armin.nosp@m..nov.nosp@m.ak@th.nosp@m.inca.nosp@m.st.co.nosp@m.m Copyright 2017 Thincast Technologies GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Function Documentation

◆ contains_dotdot()

static BOOL contains_dotdot ( const WCHAR *  path,
size_t  base_length,
size_t  path_length 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_combine_fullpath()

static WCHAR* drive_file_combine_fullpath ( const WCHAR *  base_path,
const WCHAR *  path,
size_t  PathWCharLength 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_fix_path()

static BOOL drive_file_fix_path ( WCHAR *  path,
size_t  length 
)
static
Here is the caller graph for this function:

◆ drive_file_free()

BOOL drive_file_free ( DRIVE_FILE file)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_init()

static BOOL drive_file_init ( DRIVE_FILE file)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_new()

DRIVE_FILE* drive_file_new ( const WCHAR *  base_path,
const WCHAR *  path,
UINT32  PathWCharLength,
UINT32  id,
UINT32  DesiredAccess,
UINT32  CreateDisposition,
UINT32  CreateOptions,
UINT32  FileAttributes,
UINT32  SharedAccess 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_query_directory()

BOOL drive_file_query_directory ( DRIVE_FILE file,
UINT32  FsInformationClass,
BYTE  InitialQuery,
const WCHAR *  path,
UINT32  PathWCharLength,
wStream output 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_query_from_attributes()

static BOOL drive_file_query_from_attributes ( const DRIVE_FILE file,
const WIN32_FILE_ATTRIBUTE_DATA attrib,
UINT32  FsInformationClass,
wStream output 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_query_from_handle_information()

static BOOL drive_file_query_from_handle_information ( const DRIVE_FILE file,
const BY_HANDLE_FILE_INFORMATION info,
UINT32  FsInformationClass,
wStream output 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_query_information()

BOOL drive_file_query_information ( DRIVE_FILE file,
UINT32  FsInformationClass,
wStream output 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_read()

BOOL drive_file_read ( DRIVE_FILE file,
BYTE buffer,
UINT32 *  Length 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_seek()

BOOL drive_file_seek ( DRIVE_FILE file,
UINT64  Offset 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_set_fullpath()

static BOOL drive_file_set_fullpath ( DRIVE_FILE file,
WCHAR *  fullpath 
)
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_set_information()

BOOL drive_file_set_information ( DRIVE_FILE file,
UINT32  FsInformationClass,
UINT32  Length,
wStream input 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ drive_file_write()

BOOL drive_file_write ( DRIVE_FILE file,
const BYTE buffer,
UINT32  Length 
)
Here is the call graph for this function:
Here is the caller graph for this function: