[opensuse] Re: [Mono-list] Creating file name from string
- From: Jerry Houston <jerry@xxxxxxxxxxxxx>
- Date: Sun, 29 Jun 2008 15:56:57 -0700
Andrus wrote:
I need to create legal file name form any string so that PDF and other
viewers show nice title.
This code should create legal file name in every platform supported by MONO
and .NET
I created method LegalFileName() for this which uses 2 helper methods.
It replaces <>\/:?*"| characters in name.
In the System.IO.Path class, there's an InvalidFilenameCharacters property and InvalidPathCharacters, that should provide you with the characters you can't use on a given system.
I haven't worked much with mono yet, but I'm guessing that System.IO.Path is probably fully implemented, and well tested.
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
- Follow-Ups:
- Re: [opensuse] Re: [Mono-list] Creating file name from string
- From: Jerry Houston
- Re: [opensuse] Re: [Mono-list] Creating file name from string
- Prev by Date: [opensuse] Has anyone yet recieved thier boxed OpenSuse?
- Next by Date: Re: [opensuse] Re: KDE4 oddities and problems
- Previous by thread: [opensuse] Has anyone yet recieved thier boxed OpenSuse?
- Next by thread: Re: [opensuse] Re: [Mono-list] Creating file name from string
- Index(es):