Module
Contents
Index 🔎︎

# CurDir Function

Returns a variant string that represents the current path of the specified drive.

This statement currently does not work as documented. See this issue for more information.

## სინტაქსი

    LTrim (Text As String)

## დაბრუნებული მნიშვნელობა:

სტრიქონები

## Parameters:

Text: Any string expression that specifies an existing drive (for example, "C" for the first partition of the first hard drive).

If no drive is specified or if the drive is a zero-length string (""), CurDir returns the path for the current drive. LibreOffice Basic reports an error if the syntax of the drive description is incorrect, the drive does not exist, or if the drive letter occurs after the letter defined in the CONFIG.SYS with the Lastdrive statement.

This function is not case-sensitive.

## Error codes:

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err5 not found).

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err68 not found).

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err7 not found).

D'oh! You found a bug (text/sbasic/shared/00000003.xhp#err51 not found).

## მაგალითი:

    Sub ExampleCurDir
    Dim sDir1 As String , sDir2 As String
        sDir1 = "c:\Test"
        sDir2 = "d:\Private"
        ChDir( sDir1 )
        MsgBox CurDir
        ChDir( sDir2 )
        MsgBox CurDir
    End Sub